-
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.
kv: support STAGING transactions in kv protocol and client
This PR polishes off the protocol and client level changes from #35165 to allow transactions to be moved to the STAGING state during parallel commits. To do so, the change makes two major contributions. First, it adds support to EndTransaction request and response for moving a transaction record to the STAGING status in addition to the ABORTED and COMMITTED status. This is done in a way that interacts elegantly with a transaction's in-flight writes and allows the request to move a transaction record directly to the COMMITTED status when all of the in-flight writes are on the same range as the transaction record. The second contribution is that the change adds full support to the txnCommitter interceptor to issue parallel commits when possible and then to launch the asynchronous portion of marking a transaction as explicitly committed if it determines that a transaction is implicitly committed. This is likely the area of the change where reviewers will want to look first, as it incorporates the bulk of the parallel commits algorithm and also serves as its primary documentation. The final remaining piece of work after this change is to adjust DistSender to actually send EndTransaction requests in parallel with writes in the same batch and with QueryIntents for previous writes. This change makes it safe to do so, but doesn't actually add any logic to DistSender. There are a few complications to that piece and it's also the least interesting part of this change, which is why I have saved it for last. Release note: None
- Loading branch information
1 parent
054b4bc
commit dbed085
Showing
29 changed files
with
2,992 additions
and
1,325 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
Oops, something went wrong.