Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util/log: stop syncing writes excessively #58995

Merged
merged 1 commit into from
Jan 19, 2021

Conversation

knz
Copy link
Contributor

@knz knz commented Jan 14, 2021

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 synchronize
writes (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 sink
configurations 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 file
sink configurations has been added. It is set to true (writes are
buffered) by default; and set to false (i.e. avoid buffering and
flush every log entry) when the auditable flag is requested.

@knz knz requested review from bdarnell and itsbilal January 14, 2021 13:18
@knz knz requested a review from a team as a code owner January 14, 2021 13:18
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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 synchronize
writes (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 sink
configurations 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 file
sink configurations has been added. It is set to `true` (writes are
buffered) by default; and set to `false` (i.e. avoid buffering and
flush every log entry) when the `auditable` flag is requested.
Copy link
Member

@itsbilal itsbilal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 14 of 14 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @bdarnell)

@knz
Copy link
Contributor Author

knz commented Jan 19, 2021

thank you!

bors r=itsbilal

@craig
Copy link
Contributor

craig bot commented Jan 19, 2021

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logging: make sync-writes false in default config for audit logs
3 participants