$push is not idempotent

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • ALL
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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() );
      

              Assignee:
              Unassigned
              Reporter:
              Kristina Chodorow (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: