[SERVER-5789] $push is not idempotent Created: 08/May/12  Updated: 28/Sep/12  Resolved: 10/May/12

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: Kristina Chodorow (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-3407 oplog is not idempotent for array ope... Closed
Operating System: ALL
Participants:

 Description   

To ensure operations are idempotent, $push does things like:

"o2" : { "_id" : ObjectId("4fa9426c9c7d54fb76105a20"), "someArray" : { "$size" : 1 }
// or
"o2" : { "_id" : ObjectId("4fa9426c9c7d54fb76105a20"), "someArray" : null }

But the replication code ignores the second field:

BSONObjBuilder b;
b.append(_id); // criteria is only _id field!
updateObjects(ns, o, b.done(), true, false, false , debug, false,
    QueryPlanSelectionPolicy::idElseNatural() );



 Comments   
Comment by Kristina Chodorow (Inactive) [ 10/May/12 ]

I misread the code.

Generated at Thu Feb 08 03:09:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.