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.
kv: ignore missing txn record errors in txn heartbeat loop
Related to cockroachdb#20448. This change adds a reason enum to`TransactionStatusError`. This enum includes a variant is returned when an operation looks up a transaction record that it expects to exist and finds that it does not. This is possible for `HeartbeatTxnRequests` and `EndTxnRequests`. The change then detects this error type in the `TxnCoordSender` heartbeat loop. Unlike for any other error type, this error does not force the heartbeat loop to shut down. The reason for this is that the heartbeat loop can be started before a client is certain that a transaction record has been written. If this is ever the case, like we saw in the YCSB exploration, then terminating the heartbeat loop on a `TransactionStatusError` will prematurely abort the entire transaction. Release note (bug fix): Fixed bug where an expected transaction heartbeat failure aborted the transaction.
- Loading branch information
1 parent
c18ad15
commit 8fe41db
Showing
8 changed files
with
270 additions
and
168 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
Large diffs are not rendered by default.
Oops, something went wrong.
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