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

Replicate updates changing value under new shard key pattern as delete + insert in a transaction

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • Sharding 2020-10-19, Sharding 2020-11-02, Sharding 2020-11-16
    • 0

    Description

      This is analogous to updates changing the value under the current shard key pattern. Taking inspiration from WouldChangeOwningShard, one option is to introduce a new WouldChangeOwningRecipientShard error code. update_stage.cpp would throw a WouldChangeOwningRecipientShard exception to have the operation be retried as a delete + insert in a transaction. The exception could be handled in service_entry_point_common.cpp rather than bubbling all the way back to mongos. This is because the document being modified is still owned by the donor shard. Note that the case for WouldChangeOwningShard should therefore be checked before the case for WouldChangeOwningRecipientShard.

      Attachments

        Issue Links

          Activity

            People

              alex.taskov@mongodb.com Alexander Taskov (Inactive)
              max.hirschhorn@mongodb.com Max Hirschhorn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: