[SERVER-22590] applyChunkOpsDeprecated retries and throws an error on preCondition no longer matching because the original write worked Created: 12/Feb/16 Updated: 19/Nov/16 Resolved: 25/Feb/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.4, 3.3.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dianna Hohensee (Inactive) | Assignee: | Dianna Hohensee (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | code-and-test | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Completed: | |||||||||
| Sprint: | Sharding 10 (02/19/16), Sharding 11 (03/11/16) | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 0 | ||||||||
| Description |
|
If the applyChunkOpsDeprecated's applyOps write works, but doesn't send back OK, it will retry. However, because the first write worked, the precondition does not match and it returns an error. applyChunkOpsDeprecated should double check whether the chunk changes did actually make it into the oplog, and if so return success. moveChunk already deals with this issue, but splitChunk and mergeChunk do not. ChunkMoveOperationState::commitMigration looks at the result of applyChunkOpsDeprecated and if there's an error reloads the chunk information from the oplog and checks to see if the new version number is there – if so, it succeeded. Potential solution: |
| Comments |
| Comment by Githook User [ 25/Feb/16 ] |
|
Author: {u'username': u'DiannaHohensee', u'name': u'Dianna Hohensee', u'email': u'dianna.hohensee@10gen.com'}Message: (cherry picked from commit ff296b3279257d2ff8e53ee90eb0f6a6f5c562f4) |
| Comment by Githook User [ 24/Feb/16 ] |
|
Author: {u'username': u'DiannaHohensee', u'name': u'Dianna Hohensee', u'email': u'dianna.hohensee@10gen.com'}Message: |