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

mongos update command implementation should omit nModified if forced to down-convert

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.6.0-rc1
    • Fix Version/s: None
    • Component/s: Sharding, Write Ops
    • Labels:
      None

      Description

      Given a 2.6 mongos and a 2.4 mongod shard:

      mongos> db.test.insert({_id : 1})
      mongos> db.test.find()
      { "_id" : 1 }
      mongos> db.runCommand({"update" : "test", updates : [ {q : {_id : 1}, u : {"$set" : {x : 1} }  } ] } )
      { "ok" : 1, "nModified" : 0, "n" : 1 }
      mongos> db.test.find()
      { "_id" : 1, "x" : 1 }

      This is not correct, as 1 document was modified.

      To be consistent with SERVER-13001, mongos should omit nModified if its value can not be reliably determined due to the need to down-convert to OP_UPDATE when forwarding the update to a mongod < 2.6.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              greg_10gen Greg Studer
              Reporter:
              jeff.yemin Jeffrey Yemin
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: