[SERVER-80307] Allow findAndModify to update shard key without specifying full shard key in the query Created: 22/Aug/23  Updated: 24/Aug/23  Resolved: 24/Aug/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Wenqin Ye Assignee: Wenqin Ye
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-44422 Allow findAndModify and delete one to... Closed
Sprint: Sharding NYC 2023-09-04
Participants:

 Description   

Currently this command fails:

db.customers.findAndModify(
   {
     query: { "username" : "valenciajennifer" },
     update: { "address": "Unit 104711 Box 4089 DPO AA 57348" },
     upsert: true
   }
)

With the error:

MongoServerError: Plan executor error during findAndModify :: caused by :: Shard key update is not allowed without specifying the full shard key in the query



 Comments   
Comment by Wenqin Ye [ 24/Aug/23 ]

Closing as we determined that we are fine with not supporting updating the shard key without specifying full shard key in the query.

Generated at Thu Feb 08 06:43:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.