server: background tasks incorrectly hang off the server start
context
#90550
Labels
A-observability-inf
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
(found while working on #90384)
During server startup, in
(*Server).PreStart()
we have 2 contexts of interest:ctx
is bound to the top-level CLI command, and is tracing the initialization of the server. It has a tracing span attached.workersCtx
is a background context with a few log tags but no tracing span.The intention is to use
workersCtx
for all async tasks spawned from there.However, as of this writing the following do not use
workersCtx
:s.startSystemLogsGC()
startPurgeOldSessions()
s.ctSender.Run()
(this one likely not affected, because it doesn't generate trace events)s.startAttemptUpgrade()
-- this is likely intentional: we probably want the ability to inspect a trace if the auto-upgrade fails. However, this intention should be marked with a comment.s.node.tenantSettingsWatcher.Start()
s.kvProber.Start()
publishPendingLossOfQuorumRecoveryEvents()
Jira issue: CRDB-20832
The text was updated successfully, but these errors were encountered: