[SERVER-11746] Improve shard version checking for versioned (single) updates after yield Created: 16/Nov/13 Updated: 13/Oct/15 Resolved: 26/Aug/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding, Write Ops |
| Affects Version/s: | 2.5.4 |
| Fix Version/s: | 3.0.7 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Randolph Tan |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Sprint: | Sharding 8 08/28/15 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
Need to make sure we are checking the shard version correctly and return the correct error, stale config. We should ensure that this is done for findAndModify and any other update callers. Greg suggests that we should investigate if all version checks can be done directly in the update code. |
| Comments |
| Comment by Randolph Tan [ 26/Aug/15 ] |
|
Fixed with: https://github.com/mongodb/mongo/commit/e9312347ba068ac83695e6eacb2f35c03e57bbd7 Note that there are already shard version checks being performed after yield, specifically right in the logOp listener. However, the version used for checking is not being set if the connection does not have the version set (https://github.com/mongodb/mongo/blob/r3.0.6/src/mongo/db/commands/write_commands/batch_executor.cpp#L886-l896). The fix is to make the write command path use ShardConnections so every connection it uses will have shard information. |
| Comment by Randolph Tan [ 23/Jul/15 ] |
|
Thanks to |