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

    XMLWordPrintableJSON

Details

    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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:
              3 years, 41 weeks, 3 days ago