Skip to content

log: drain all buffered log messages during the final flush by the buffered sink #72455

@knz

Description

@knz

This is follow up work to #70330.

When the server shuts down, this is indicated to the accumulator via the context.Done() channel.
When this happens, the accumulator consumes at most 1 of the log messages buffered so far on messageCh. If there were more messages there, they get lost.

The code should be updated to loop over messageCh until the read blocks.

(Also, we would want the shutdown to be signalled to the logging system as late as possible. Perhaps a different context cancellation should be used, that is only called very late in the server startup sequence).

Jira issue: CRDB-11163

Metadata

Metadata

Assignees

Labels

A-loggingIn and around the logging infrastructure.A-server-start-drainPertains to server startup and shutdown sequencesC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-server-and-securityDB Server & Security

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions