Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-5789

$push is not idempotent

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

      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 Unassigned
            Reporter:
            kristina Kristina Chodorow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: