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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 2.6.0-rc1
    • Sharding, Write Ops
    • 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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: