-
Notifications
You must be signed in to change notification settings - Fork 4.1k
log: ensure that the buffer sink flushes do not hog up a server shutdown #72459
Copy link
Copy link
Closed
Labels
A-loggingIn and around the logging infrastructure.In and around the logging infrastructure.A-server-start-drainPertains to server startup and shutdown sequencesPertains to server startup and shutdown sequencesC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-loggingIn and around the logging infrastructure.In and around the logging infrastructure.A-server-start-drainPertains to server startup and shutdown sequencesPertains to server startup and shutdown sequencesC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.