Allow findAndModify to update shard key without specifying full shard key in the query

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Sharding NYC 2023-09-04
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
      

              Assignee:
              Wenqin Ye
              Reporter:
              Wenqin Ye
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: