-
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.
73557: kv: unify client and server-side refresh code paths r=andreimatei a=nvanbenschoten This commit is a pure refactor that unifies various code paths that perform transaction refreshing. It consolidates the conditions used to check whether a refresh is permitted for a Transaction, the mechanism through which a Transaction protobuf is updated during a Refresh (`Transaction.Refresh`), and, most importantly, it consolidates the logic that determines the necessary refresh timestamp from a `roachpb.Error` (`TransactionRefreshTimestamp`). This lays the groundwork to eventually be able to perform server-side refreshes for `ReadWithinUncertaintyIntervalError`s. However, there is a bit of complexity with doing so because of read latches, which is mentioned in a comment. Co-authored-by: Nathan VanBenschoten <[email protected]>
- Loading branch information
Showing
5 changed files
with
84 additions
and
68 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