util/log: stop syncing writes excessively #58995
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Requested by @bdarnell
Fixes #58025
Release note (cli change): Previously, for certain log files
CockroachDB would both flush individual writes (i.e. propagate them
from within the
cockroach
process to the OS) and also synchronizewrites (i.e. ask the OS to confirm the log data was written to
disk). The per-write synchronization part was unnecessary and, in
fact, found to be possibly detrimental to performance and operating
cost, so it was removed. Meanwhile, the log data continues to be
flushed as previously, and CockroachDB also periodically (every 30s)
request synchronization, also as previously.
Release note (cli change): The parameter
sync-writes
for file sinkconfigurations has been removed. (This is not a backward-incompatible
change because the configuration feature is new in v21.1.)
Release note (cli change): The parameter
buffered-writes
for filesink configurations has been added. It is set to
true
(writes arebuffered) by default; and set to
false
(i.e. avoid buffering andflush every log entry) when the
auditable
flag is requested.