[SERVER-20361] Improve the behaviour of multi-update/delete against a sharded collection Created: 10/Sep/15 Updated: 12/Dec/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Sharding, Write Ops |
| Affects Version/s: | 2.6.11, 3.0.6, 3.1.7 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | Backlog - Cluster Scalability |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | sharding-causes-bfs-hard | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Cluster Scalability
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Sprint: | Sharding 9 (09/18/15), Sharding 10 (02/19/16) | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||
| Linked BF Score: | 19 | ||||||||||||||||||||
| Description |
|
Multi-updates/deletes against a sharded collection are sent with shard version IGNORED against the set of all nodes which the given router thinks have chunks from that collection. Because of this, the following anomalies can happen:
This ticket is intended to serve as the generic catch-all of these issues. |
| Comments |
| Comment by Esha Maharishi (Inactive) [ 08/Mar/16 ] |
|
After the commit in Instead, the mongos sends an IGNORED shard version if targeting multiple shards for a multiUpdate or multiRemove without an equality match on the shard key. Therefore, this issue remains for non-idempotent multiUpdates with an equality match on the shard key:
As an aside, any time mongos targets multiple shards, it actually targets all shards. However, only shards containing the relevant data are affected by the re-applied write. |
| Comment by Spencer Brody (Inactive) [ 10/Sep/15 ] |
|
I believe the fix would be to simply get the version for checkShardVersion from the OperationShardVersion/ShardedConnectionInfo rather than the parsed BatchedUpdateRequest |