-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Cluster Scalability
-
ALL
-
v8.0
-
0
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
- Open
- is related to
-
SERVER-85275 Resharding oplog application should ignore DuplicateKey error
- Needs Scheduling