-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
Fully Compatible
-
ALL
-
v8.0
-
CAR Team 2024-07-22
-
200
if there is a unique index on field other than _id.
This is because the resharding oplog batch applier partitions a batch of oplog to apply by _id of the document to each worker thread. This creates a scenario where ops are executed on a different order compared to the source collection, potentially introducing a uniqueness violation that never occurred in the source collection.
Some examples (unique on field x):
op0: insert _id: 1, x: 1
op1: delete _id: 1
op2: insert _id: 2, x: 1
Example order that cauases a uniquness violation: op0 -> op2 -> op1
Another example (unique on field x):
op0: insert _id: 1, x: 1
op1: insert _id: 2, x: 2
op2: update _id: 2, set x = 3
op3: update _id: 1, set x = 2
Example order that causes a uniquness violation: op0 -> op1 -> op3 -> op2
- is depended on by
-
SERVER-90646 Re-enable background_unique_indexes.js in config transition suites
- Backlog
- is related to
-
SERVER-85275 Resharding oplog application should ignore DuplicateKey error
- Backlog
- related to
-
SERVER-92043 Add reshardingOplogBatchTaskCount as a command parameter to reshardCollection, moveCollection and unshardCollection
- Backlog