Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13205

Investigate changes in SERVER-44382: Allow upserting a document that is missing a shard key field

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 4.3.1
    • Component/s: manual, Server
    • Labels:
      None

      Description

      Description

      Downstream Change Summary

      This ticket fixed a bug in SERVER-42390 that didn't allow upserted documents to have missing shard key fields. The behavior is the same as should have been communicated through SERVER-42390's downstream changes, I only gave this ticket downstream changes to make sure it's clear the bug wasn't the intentional behavior.

      Description of Linked Ticket

      SERVER-42390 allowed users to insert documents that are missing shard key fields and unset shard key fields through an update. An upsert that doesn't match an existing document takes a different code path than other updates, which currently incorrectly will reject a write that would result in a document without a shard key field because of this check. Instead, the upsert path should only assert the shard key paths do not contain arrays and that _id is present and does not contain an array.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              backlog-server-pm Backlog - DB Eng Program Management Team
              Participants:
              Last commenter:
              Kay Kim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since reply:
                23 weeks ago
                Date of 1st Reply: