Currently the log package has two separate time-based flushing mechanism:
a single periodic flusher goroutine that calls flush() and sync() on all the file sinks
one flusher goroutine per bufferSink wrapper that's currently used only for network output
We would like to unify both mechanisms.
Consideration should be given to simplicity and troubleshooting/maintenance burden.
The global periodic flusher goroutine has some simplicity advantages and the current bufferSink design provides flexilbility wrt flushing that was not exactly called for by its motivating use cases.
One thing that's important is to ensure the buffer sink decorator honors the "always flush" toggle set up when a server process receives SIGTERM for the first time (see cli/start.go)
This is follow up work to #70330.
Currently the log package has two separate time-based flushing mechanism:
bufferSink
wrapper that's currently used only for network outputWe would like to unify both mechanisms.
Consideration should be given to simplicity and troubleshooting/maintenance burden. The global periodic flusher goroutine has some simplicity advantages and the current
bufferSink
design provides flexilbility wrt flushing that was not exactly called for by its motivating use cases.Jira issue: CRDB-11166