[SERVER-15292] Failed update reports erroneous WriteResult Created: 17/Sep/14 Updated: 04/Oct/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 2.6.4, 2.7.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Eric Daniels (Inactive) | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Query Execution
|
||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Steps To Reproduce: | 1. Insert test data
2. Update data with multi
Result:
Expected?:
|
||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
See reproduction. The erroneous fields are nMatched and nModified. On a related note. The documentation on a collection update doesn't specify what happens when an update with multi fails on a specific document when more than one was matched. |
| Comments |
| Comment by Asya Kamsky [ 04/Jan/19 ] |
|
Still the case in 4.1.4 |
| Comment by David Storch [ 10/May/16 ] |
|
The issue is that the UpdateStage uasserts when the UpdateDriver cannot apply the update modifiers. The resulting exception prevents us from calling UpdateStage::makeUpdateResult(), which is responsible for returning metrics like nMatched and nModified. This is similar to SERVER-22252, which describes another manifestation of missing debug info on query failure. |