forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
102504: kv: enable no-op preemptive refreshes under under weak isolation levels r=nvanbenschoten a=nvanbenschoten This PR adds a new test variant to `TestTxnCoordSenderRetries` where a no-op preemptive refresh avoids a client-side transaction retry by refreshing before the transaction establishes read spans (which would fail a refresh). The test initially fails for Snapshot isolation transactions (not tested in CI), which never perform preemptive refreshes. In 33fda25, we disabled preemptive refreshes for weak isolation transactions. After adding the test, this PR refines that logic by enabling preemptive refreshes for these isolation levels if the refresh is free (as opposed to inevitable). As the test shows, this can avoid client-side retries, even in Snapshot transactions. Epic: None Release note: None Co-authored-by: Nathan VanBenschoten <[email protected]>
- Loading branch information
Showing
3 changed files
with
86 additions
and
31 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