-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Sharding NYC
-
Sharding NYC 2023-07-24, Sharding NYC 2023-08-07, Sharding NYC 2023-08-21
At the moment, update commands do not work if you do not specify the full shard key in the following cases when the two phase protocol is disabled:
- If the update command updates the shard key, then the full shard key has to be specified in the query
- If the update command has `upsert == true` then the full shard key has to be specified in the query
This ticket should investigate and modify those cases so that they still work even if a partial shard key is provided (if it is possible). This code should also be backported to 5.0 and 6.0.
The context for why this ticket is needed is that customers use resharding to quickly add a new shard, and that involves first refining the shard key to a new temporary shard key and then refining it back to the original. When the shard key is refined to a temporary one, that will cause some of the user's existing update queries to break as they expect the new full refined shard key. So this ticket will prevent user's existing queries from breaking when they refine their shard key temporarily for resharding.
- is related to
-
SERVER-44422 Allow findAndModify and delete one to target by query instead of extracted shard key
- Closed