[SERVER-13093] mongos update command implementation should omit nModified if forced to down-convert Created: 07/Mar/14  Updated: 09/Jul/16  Resolved: 07/Mar/14

Status: Closed
Project: Core Server
Component/s: Sharding, Write Ops
Affects Version/s: 2.6.0-rc1
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Greg Studer
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-13001 exclude nModified from legacy write r... Closed
Participants:

 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.



 Comments   
Comment by A. Jesse Jiryu Davis [ 07/Mar/14 ]

Re-closing, Scott explained to me that SERVER-13001 will encompass all changes to the behavior of nModified.

Comment by Scott Hernandez (Inactive) [ 07/Mar/14 ]

Yes, it has already been updated accordingly.

Comment by Jeffrey Yemin [ 07/Mar/14 ]

SERVER-13001 is to change the bulk write API implementation in the shell. This is for the mongos implementation of the update command. They are related, but the code changes need to be made in two different places.

Comment by Scott Hernandez (Inactive) [ 07/Mar/14 ]

dup of SERVER-13001

Generated at Thu Feb 08 03:30:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.