[SERVER-8537] Incorrect result numbers for partial updates if there is an error Created: 12/Feb/13 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Adinoyi Omuya | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | ShardingRoughEdges, query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Execution
|
| Operating System: | ALL |
| Participants: |
| Description |
|
When a multi update is applied to a collection where the operation is unable to be applied to all documents (e.g. a $inc on an array field), getLastError() returns "n" : 0 with the error but the operation still updates documents that it is able to update. The multi-update returns as soon as it fails to apply an operation. Expected behavior: It should report "n" : `count of the number of documents it was able to update` as well as the error. Actual behavior: Reports error and "n" : 0. The example below updates 1/2 documents, but returns "n" : 0
|
| Comments |
| Comment by Asya Kamsky [ 13/Jul/18 ] | ||||||||
|
This doesn't seem to have anything to do with sharding to moving to Query backlog. With 4.0 it looks like behavior is similar:
| ||||||||
| Comment by Asya Kamsky [ 13/Jul/18 ] | ||||||||
|
Why is this on sharding backlog rather than query?
|