-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
QE 2023-09-04
-
30
Test cancel_coordinate_txn_commit_with_tickets_exhausted.js checks that transaction coordinator will correctly timeout and abort transaction even if all write tickets from WiredTiger are exhausted.
It uses hangWithLockDuringBatchRemove to create threads that exhaust write tickets and transaction coordinator server status to determine when transaction is past certain point: https://github.com/mongodb/mongo/blob/a4f458fe4d7a44eba056f5c150753e73067c8e4d/jstests/sharding/cancel_coordinate_txn_commit_with_tickets_exhausted.js#L135
After the transaction is past kWaitingForVotes, it disabled the fail points.
It used to work, because we used to do everything inside transaction coordinator synchronously, but as a side effect of SERVER-79091 we know delete coordinator doc asynchronously and the test run one transaction before starting the test to initialize transaction_coordinator system:
In rare cases it is possible that the check (line 135) that supposed to check our main transaction (line 99) will be satisfied by prior transaction (line 86) and fail point will disabled before we are able to satisfy check on line 106