-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
66338: kv: don't hold latches while rate limiting ExportRequests r=nvanbenschoten a=nvanbenschoten This commit moves ExportRequest rate limiting up above evaluation and outside of latching. This ensures that if an ExportRequest is rate-limited, it does not inadvertently block others while waiting. Interestingly, we were already careful about this for `AddSSTableRequests` because it is easier for them to block others while holding latches. In the case of read-only requests like `ExportRequest`, blocking others is less common. However, it is still possible. Notably, MVCC write requests with lower timestamps than the read will still block. Additionally, non-MVCC requests like range splits will block. In one customer investigation, we found that an export request was holding latches and blocking a non-MVCC request (a range split) which was transitively blocking all write traffic to the range and all read traffic to the RHS of the range. We believe that the stall lasted for so long (seconds to minutes) because the ExportRequest was throttled while holding its latches. I did notice that some of this code was just touched by #66092, so any potential backport here may be a little involved. Release note (bug fix): Backups no longer risk the possibility of blocking conflicting writes while being rate limited by the kv.bulk_io_write.concurrent_export_requests concurrency limit. /cc. @cockroachdb/kv Co-authored-by: Nathan VanBenschoten <[email protected]>
- Loading branch information
Showing
7 changed files
with
78 additions
and
55 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
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