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.
storage: support no-op PUSH_TIMESTAMP pushes on STAGING transactions
Caught while manually testing parallel commits last week. PR cockroachdb#35763 made it an error to resolve an intent with a STAGING status. This isn't a crazy thing to do in every circumstance though. The case where this comes up is a PUSH_TIMESTAMP push on a STAGING transaction whose timestamp is already sufficiently high. In this case, the pusher can move the intent up out of its way without modifying the transaction record or interfering with the parallel commit. Concretely, this is allowed in pushes that hit this case: https://github.com/cockroachdb/cockroach/blob/4ab679d978a8f566c1427b372547380ee012292f/pkg/storage/batcheval/cmd_push_txn.go#L197 To test this, the commit extends `TestStoreResolveWriteIntentPushOnRead` to test scenarios in two different dimensions: PENDING vs. STAGING transaction records and already pushed txns vs. not already pushed txns. To test the latter dimensions, the commit had to refine how far into the future transactions push conflicting intents. Previously, transactions would push them all the way to hlc.Now() on the pushing node so that there was no chance that they would be in their uncertainty window after the push. This was pessimistic. The transaction only needs to push the conflicting intent up to its observed timestamp for the pushing node, which may be significantly lower than the current timestamp on the pushing node. This should increase the number of no-op pushes we see in the wild. Release note: None
- Loading branch information
1 parent
3f988b1
commit f78c17a
Showing
8 changed files
with
227 additions
and
109 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
Oops, something went wrong.