- Session 1 (S1) is created
- S1 begins a transaction T1
- T1 writes to key K1
- T1 is prepared
- A new session S2 is created, starts transaction T2 and fails to write to K1 due to a write conflict
- T2 is rolled back
- S2 is closed
- T1 is rolled back
Steps 2-8 are then repeated in a loop.
After 1088 iterations T1 will fail to write to K1 with a write conflict, even though there are no active transactions that have written to K1.
This will not occur if:
- WiredTiger is not in-memory
- T2 does not attempt to write to K1
- T1 is not prepared
If an additional step 9 is added to the loop where a third session S3 is created and closed then the failure will still occur, but on a random iteration and not on loop 1088. S3 does not need to start or rollback a transaction for this to occur.
Definition of Done
Identify the cause of this issue and resolve it. The attached WT replicator no longer fails and the Mongo replicator from
SERVER-62685 also no longer fails.