-
Type:
Task
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
-
0
For multi:false update and delete commands whose filter has an equality predicate on "_id", if the command's filter does not target a single shard, then MongoDB will always broadcast the update or delete command to all shards, even when it would be possible to target a narrower set of shards (because the filter has a range predicate on the shard key, or because some shards don't own any chunks for the collection).
MongoDB has had this behavior since it was introduced in v2.6 by SERVER-13448.
multi:true update and delete commands also behave this way, and this behavior was identified as being problematic for multi:true updates/deletes for some use cases. SERVER-101737 recently added a cluster param to change this behavior for multi:true updates/deletes (when the cluster param is enabled multi:true updates/deletes will only target the required shards).
The goal of this ticket is to figure out if MongoDB can be changed so that updates/deletes on _id will only target the required shards instead of targeting all shards, and to implement to the appropriate changes to the code.
- duplicates
-
SERVER-101167 updateOne matching on _id and upsert:false should only send the operations to shards owning chunks
-
- Backlog
-
- is related to
-
SERVER-13448 multi-update targeting does not broadcast to all shards
-
- Closed
-