-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
77433: kvserver: limit concurrent consistency checks r=tbg a=erikgrinaker Consistency checks run asynchronously below Raft on all replicas using a background context, but sharing a common per-store rate limit. It was possible for many concurrent checks to build up over time, which would reduce the rate available to each check, exacerbating the problem and preventing any of them from completing in a reasonable time. This patch adds two new limits for asynchronous consistency checks: * `consistencyCheckAsyncConcurrency`: limits the number of concurrent asynchronous consistency checks to 7 per store. Additional consistency checks will error. * `consistencyCheckAsyncTimeout`: sets an upper timeout of 1 hour for each consistency check, to prevent them from running forever. `CHECK_STATS` checks are exempt from the limit, as these are cheap and the DistSender will run these in parallel across ranges, e.g. via `crdb_internal.check_consistency()`. There are likely better solutions to this problem, but this is a simple backportable stopgap. Touches #77432. Resolves #77080. Release justification: fixes for high-priority or high-severity bugs in existing functionality. Release note (bug fix): Added a limit of 7 concurrent asynchronous consistency checks per store, with an upper timeout of 1 hour. This prevents abandoned consistency checks from building up in some circumstances, which could lead to increasing disk usage as they held onto Pebble snapshots. Co-authored-by: Erik Grinaker <[email protected]>
- Loading branch information
Showing
4 changed files
with
71 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters