-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release-23.2: cli: create new tracing span in mt-start-sql #113595
Conversation
This commit fixes a possible misuse of the tracing infrastructure with `mt start-sql` command. In particular, previously it was possible for a tracing span created (and finished) in `runStartInternal` to be used by a couple of things in `makeTenantSQLServerArgs` (main one being `rpc.Context`) that hold on to the context after the corresponding span has been finished. This is disallowed (since we reuse spans after `Finish` has been called on them) and was recently discovered. This problem is now fixed by deriving a child span only in `mt start-sql` code path that is never finished (since those users can be active throughout the whole lifetime of the tenant server). The bug is pretty minor (I think only serverless is affected), so there is no release note. Release note: None
e28fcdd
to
d9f3d98
Compare
Thanks for opening a backport. Please check the backport criteria before merging:
If your backport adds new functionality, please ensure that the following additional criteria are satisfied:
Also, please add a brief release justification to the body of your PR to justify this |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The fix is low risk and only impacts Serverless deployments.
Backport 1/1 commits from #113553 on behalf of @yuzefovich.
/cc @cockroachdb/release
This commit fixes a possible misuse of the tracing infrastructure with
mt start-sql
command. In particular, previously it was possible for a tracing span created (and finished) inrunStartInternal
to be used by a couple of things inmakeTenantSQLServerArgs
(main one beingrpc.Context
) that hold on to the context after the corresponding span has been finished. This is disallowed (since we reuse spans afterFinish
has been called on them) and was recently discovered. This problem is now fixed by deriving a child span only inmt start-sql
code path that is never finished (since those users can be active throughout the whole lifetime of the tenant server).The bug is pretty minor (I think only serverless is affected), so there is no release note.
Fixes: #113170.
Release note: None
Release justification: low-risk bug fix.