Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvcoord: fix flake in
TestTransactionUnexpectedlyCommitted
The `TestTransactionUnexpectedlyCommitted/recovery_after_transfer_lease` test, introduced to test cockroachdb#107658, has been flaky (particularly under deadlock builds) due to a race condition between a retry of a write and intent resolution. While both orderings in this test result in a correct `AmbiguousResultError` for the client, when intent resolution wins the race, the retried write will attempt to push away the current lockholder; since it is illegal for a committed transaction to perform a push, this results in a different secondary error attached to the `AmbiguousResultError`. This change ensures a predefined ordering of these operations so that the secondary error is consistent across runs of the test. Fixes: cockroachdb#110187 Release note: None
- Loading branch information