-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Replication
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The current code comment does not accurately describe the behavior when handling applyOps commands during inserts. The comment makes the following assumptions that seem to be incorrect based on manual testing:
- Incorrect Assumption:
-
- The comment assumes that there will always be a wrapping WriteUnitOfWork that helps identify when we are in an applyOps command.
- However, during a applyOps command we don't have a wrapping WriteUnitOfWork for what I could tell via manual testing.
- Unexpected Behavior:
-
- When executing an applyOps command, it is observed that instead of bypassing the insert section and directly performing the upsert as described in the code comment, the code executes both an insert and an upsert. This results in an upsert being performed on top of record just inserted that, even when produces the correct result, is unnecesary.
- related to
-
SERVER-117836 Insert applyOps can invariant on DuplicateKey due to replicated RecordIds
-
- Closed
-
1.
|
Update the comment for the applyops insert case | SERVER-118743 |
|
Open | Unassigned |