Skip to content

log: ensure that the buffer sink flushes do not hog up a server shutdown #72459

@knz

Description

@knz

This is follow up work to #70330.

Currently the bufferSink flush goroutine will wait until it has written all its incoming messages before shutting down.
If the underlying output sink is exccessively slow (or blocks outright), this makes the goroutine block for too long.

We want a timeout be added in there during shutdown, so that if the messages cannot be flushed under a reasonable time the goroutine abandons the flushes and simply reports that it has given up.

Epic CRDB-6669

Jira issue: CRDB-11167

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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions