-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
Fully Compatible
-
Repl 2019-04-08
Test that the following scenario will hit prepare conflicts:
- Create a collection and add a unique index on the 'a' field
- Start a transaction
- Insert {_id: 1, a: 1}
- Update that unsets 'a' for {_id: 1}
- Prepare the transaction
- Outside of a transaction try to insert {_id: 2, a: 1}
If this scenario did not encounter a prepare conflict, it would cause issues when recover prepared transactions at the end of initial sync. The initial insert in the transaction would fail with a duplicate key error and its update would also fail.