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

[crl-release-21.1] *: Don't block flushes on cleaning turns #1125

Conversation

itsbilal
Copy link
Contributor

@itsbilal itsbilal commented May 3, 2021

21.1 backport of #1124.


A flush isn't marked as complete (and flushing set to
false) until deleteObsoleteFiles returns. Currently,
deleteObsoleteFiles waits for other cleaning turns to complete
before doing its own cleaning. This could make flushes wait
for cleanup after large compactions, causing write stalls.

This change makes flushes move along and mark themselves as
completed if a cleaner job is already running, instead of waiting
for them. This allows for a lower impact on user-observed
write latency.

A flush isn't marked as complete (and flushing set to
false) until deleteObsoleteFiles returns. Currently,
deleteObsoleteFiles waits for other cleaning turns to complete
before doing its own cleaning. This could make flushes wait
for cleanup after large compactions, causing write stalls.

This change makes flushes move along and mark themselves as
completed if a cleaner job is already running, instead of waiting
for them. This allows for a lower impact on user-observed
write latency.
@itsbilal itsbilal requested review from jbowens and petermattis May 3, 2021 16:27
@itsbilal itsbilal self-assigned this May 3, 2021
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@petermattis petermattis left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 7 files reviewed, all discussions resolved (waiting on @jbowens)

@itsbilal
Copy link
Contributor Author

itsbilal commented May 3, 2021

TFTR!

@itsbilal itsbilal merged commit 23421fe into cockroachdb:crl-release-21.1 May 3, 2021
@itsbilal itsbilal deleted the flush-dont-wait-cleaners-21.1 branch May 3, 2021 17:16
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.

3 participants