[SERVER-13151] Ordered write command (insert) doesn't report writeConcernError if there was also a writeError Created: 12/Mar/14 Updated: 12/Mar/14 Resolved: 12/Mar/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 2.6.0-rc1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Three member replica set |
||
| Operating System: | ALL | |||||||||||||
| Steps To Reproduce: | With a 3-member replica set 1. replset:PRIMARY> db.test.insert({_id : 1}) Expected results: Response should include both a writeError, for the duplicate key on the second document, and a writeConcernError, for the failure to apply the write concern. Actual results: Response includes only a writeError:
|
|||||||||||||
| Participants: |
| Description |
|
An ordered bulk insert with both a write error and a write concern error only reports the write error. An unordered bulk insert reports both errors, as expected. |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 12/Mar/14 ] |
|
This is by design; in an ordered write command the writeConcern is only enforced if there are no errors. |