-
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.
kvserver: make most requests bypass closed timestamp computation
In #76312, we're making it such that a replica's closed timestamp is computed during the creation of the batch request's evaluation context. This is to ensure that a replica's closed timestamp is captured before we pin the state of its storage engine (since otherwise, the closed timestamp could be _newer_ than the state of the engine the command is evaluating over). See: #70974. However, computing the replica's current closed timestamp on every command evaluation can be expensive due to the mutual exclusion involved (it requires that we hold `Replica.mu` as well as a few locks inside the closed timestamp side transport). Since only the `QueryResolvedTimestampRequest` and `SubsumeRequest` need to read a replica's closed timestamp, this commit makes it such that we elide this work for every other request. Release note: None
- Loading branch information
1 parent
254142f
commit 5795da6
Showing
7 changed files
with
49 additions
and
19 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