-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
cli: avoid using background ctx in server start #73678
Conversation
2ba1f47
to
17ef92b
Compare
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.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @knz and @stevendanna)
pkg/cli/start.go, line 708 at r5 (raw file):
// We'll want to log any shutdown activity against a separate span. var shutdownSpan *tracing.Span
[nit] Is this line needed?
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.
75941fe
to
9f86eb8
Compare
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.
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 2 stale) (waiting on @RaduBerinde and @stevendanna)
pkg/cli/start.go, line 708 at r5 (raw file):
Previously, RaduBerinde wrote…
[nit] Is this line needed?
Nope, removed.
TFYRs! bors r=RaduBerinde,cameronnunez |
Build failed: |
This change ensures that the entire server startup and shutdown logic operates under a go context that is connected to the main config's tracer and AmbientCtx (and its log tags, and server identifiers). Release note: None
9f86eb8
to
359dedb
Compare
lint fail |
Build succeeded: |
72798: util: support 128 FastIntSet elements without allocation r=RaduBerinde a=RaduBerinde #### util: support 128 FastIntSet elements without allocation This commit increases the size of the "small set" bitmap from 64 bits to 128 bits. The main goal is to avoid the slow path in optimizer ColSets for more queries. Fixes #72733. Release note: None 73306: log,server: avoid global variables to log/trace server IDs r=RaduBerinde,cameronnunez a=knz First commit from #73678. Fixes #58938. (still incomplete - needs all the other PRs connected to that issue) Prior to this change, the server identifiers (cluster ID, node ID etc) were stored in global variables in the `log` package. This was problematic when a single process contains multiple servers, e.g. in tests, `demo` and multi-tenant CockroachDB. This change switches the mechanism to use identifiers stored in the go context. The disadvantage is that the server IDs are not any more logged at the beginning of each log file (since a given log file could report data from multiple servers). Release note (cli change): The server identifiers (cluster ID, node ID, tenant ID, instance ID) are not any more duplicated at the start of every new log file (during log file rotations). They are now only logged when known during server start-up. (The copy of the identifiers is still included in per-event envelopes for the various `json` output logging formats.) Co-authored-by: Radu Berinde <[email protected]> Co-authored-by: Raphael 'kena' Poss <[email protected]>
Needed for #73306.
Informs #58938.
This change ensures that the entire server startup and shutdown logic
operates under a go context that is connected to the main config's
tracer and AmbientCtx (and its log tags, and server identifiers).