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

      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.)

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              4 years, 9 weeks ago