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

Allow updates to shard key value if the doc changes shards if the update is part of a multi-stmt txn

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.10
    • None
    • Sharding
    • None
    • Fully Compatible
    • Sharding 2019-03-25

    Description

      If an update to a document's shard key value will cause the document to change shards, we throw a WouldChangeOwningShard exception. This ticket is to handle this error for updates sent as a part of a multi-statement transaction.

      In order to do this, we need to catch and re-throw this error in ServiceEntryPointCommon. In BatchWriteExec::executeBatch(), we should not abort the transaction on this error. Instead, we should run the delete-insert transaction created as part of SERVER-39835.

      If the update is not a part of a multi-stmt txn, we will error.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: