Skip to content

log: unify the async flush goroutine and the buffer sink flusher #72458

@knz

Description

@knz

This is follow up work to #70330.

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.

Jira issue: CRDB-11166

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-loggingIn and around the logging infrastructure.A-observability-infC-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.T-supportability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions