[SERVER-13001] exclude nModified from legacy write results Created: 03/Mar/14 Updated: 11/Jul/16 Resolved: 19/Mar/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding, Shell, Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | 2.6.0-rc2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | Scott Hernandez (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | 26qa | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Steps To Reproduce: | With the 2.6 shell connected to a 2.4 server:
|
||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
If nModified cannot be returned, like with a legacy write using GLE, then it should be excluded to indicate it is not valid. This is true in both the shell, and server (including mongos). |
| Comments |
| Comment by Githook User [ 19/Mar/14 ] | ||||||||||||||||||||
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: (cherry picked from commit 971bbb28a0c25ae26abe9da38e2b02b4cac36d9b) | ||||||||||||||||||||
| Comment by Githook User [ 19/Mar/14 ] | ||||||||||||||||||||
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: | ||||||||||||||||||||
| Comment by Githook User [ 13/Mar/14 ] | ||||||||||||||||||||
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: | ||||||||||||||||||||
| Comment by Githook User [ 13/Mar/14 ] | ||||||||||||||||||||
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: | ||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 10/Mar/14 ] | ||||||||||||||||||||
|
The shell's Bulk API implementation, when using write commands, will need to do something like:
| ||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 10/Mar/14 ] | ||||||||||||||||||||
|
Correct, a client (mongos likewise) cannot aggregate numbers and non-numbers like you describe. | ||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 10/Mar/14 ] | ||||||||||||||||||||
|
Clarifying a detail: I think that if an update applies to multiple shards and some are 2.6, some are 2.4, mongos must not return nModified, because mongos doesn't know nModified's true value. The general policy is: "nModified is 0 if you know it's 0. It's N if you know it's N. It's omitted (or NULL) if you don't know its true value." | ||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 07/Mar/14 ] | ||||||||||||||||||||
|
It depends on the code refactoring but hoping for omission of the field if not available. We will note well in the issue when we have a solution, and include the actual output from the commands and (bulk api) shell response. | ||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 07/Mar/14 ] | ||||||||||||||||||||
|
Is the plan for mongos to omit nModified from the response document, or to set it to NULL? Drivers should know which to expect. | ||||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 03/Mar/14 ] | ||||||||||||||||||||
|
It has to set it to NULL, cannot be 0 or nMatched as those are both incorrect. | ||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 03/Mar/14 ] | ||||||||||||||||||||
|
This is by design and the docs need to updated: nModified means something different than matched and it is incorrect to report it way you suggest. |