[SERVER-10953] mongos returns error to GLE after successful write when there was wassert on mongod Created: 29/Sep/13 Updated: 06/Dec/22 Resolved: 18/Oct/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.4.6, 2.5.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Assigned Teams: |
Sharding
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
Send an insert to mongos at a time when mongod will have 'wassert' at the time of the write (nonetheless writing the document successfully). Sending getlasterror to mongos now causes it to return error when the write was successful. It appears that mongos goes by 'err' field from shard being populated and doesn't check the 'code' field (around https://github.com/mongodb/mongo/blame/master/src/mongo/s/strategy_shard.cpp#L686 ) so now most (all?) drivers report failure to the client. |
| Comments |
| Comment by Gregory McKeon (Inactive) [ 18/Oct/18 ] |
|
Given that wassert was removed, closing as gone away. |
| Comment by Asya Kamsky [ 04/Oct/13 ] |
|
It appears that this may be on mongod rather than mongos - mongod returns "err" populated - even without mongos most drivers interpret this as a failure of the previous write operation. |