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

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

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

      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.

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

              Created:
              Updated:
              Resolved: