Skip to content

Conversation

@dt
Copy link
Contributor

@dt dt commented Dec 22, 2025

SQL start registers in liveness and invites distSQL flows to be scheduled, which may expect initialized, ready external storage. As such, init external storage before SQL start.

External storage can end up coming back and wanting to run SQL (for userfile) so this remains somewhat circular, but given a SQL flow or job or query is what would end up actually opening storage, this ordering seems less fraught than starting SQL first.

Release note: none.
Epic: none.

Unclear if this will fix all cases of observed errors here since we don't have a reproduction or failing test, so this is more of just an optimistic cleanup related to, but not yet known to close, #120022.

SQL start registers in liveness and invites distSQL flows to be scheduled, which
may expect initialized, ready external storage. As such, init external storage before
SQL start.

External storage can end up coming back and wanting to run SQL (for userfile) so this
remains somewhat circular, but given a SQL flow or job or query is what would end up
actually opening storage, this ordering seems less fraught than starting SQL first.

Release note: none.
Epic: none.

Unclear if this will fix all cases of observed errors here since we don't have a
reproduction or failing test, so this is more of just an optimistic cleanup related
to, but not yet known to close, cockroachdb#120022.
@dt dt requested review from msbutler and stevendanna December 22, 2025 22:11
@blathers-crl
Copy link

blathers-crl bot commented Dec 22, 2025

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@yuzefovich
Copy link
Member

Noting for context is this comment from Steven from a while back.

Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds reasonable to me, should we also apply the same change to SQLServerWrapper.PreStart for tenants?

@yuzefovich made 1 comment.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @msbutler and @stevendanna).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants