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

$push is not idempotent

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical - P2 Critical - P2
    • None
    • None
    • Replication
    • None
    • ALL

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: