Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-39630

Allow updates to the shard key value only when the document will not change shards

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.10
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 2019-02-25, Sharding 2019-03-11, Sharding 2019-03-25

      This ticket is to allow users to run an update that will change a document shard key value only when the document will not change shards. We should no longer throw an ImmutableField error in ModifierNode or ObjectReplaceNode unless the _id field is changed. We will error if the update is sent with multi: true, if it's sent as part of a batch with size > 1, or if it is sent without either retryWrites: true or autocommit: false.

      Once this ticket is finished, we will still error if an update is sent that will cause the document to change shards.

            Assignee:
            janna.golden@mongodb.com Janna Golden
            Reporter:
            janna.golden@mongodb.com Janna Golden
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: