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

Add abortReshardCollection command for users to cancel the resharding operation

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Sharding 2021-02-22, Sharding 2021-03-08, Sharding 2021-03-22, Sharding 2021-04-05
    • Linked BF Score:
      165
    • Story Points:
      3

      Description

      Introducing a separate command for users to cancel a resharding operation has advantages over hooking into the existing killOp command, namely customizing the error responses.

      db.adminCommand({abortReshardCollection: "<database>.<collection>"});
      

      • An error will be returned if the resharding operation can no longer be canceled due to the coordinator already having begun to instruct the recipient shards to rename the temporary resharding collection.
      • An error will be returned if there's no resharding operation in progress for the namespace.
      • On success, the abortReshardCollection command will have waited for the coordinator to have forgotten about the resharding operation. It is therefore possible to immediately run a new reshardCollection command after the abortReshardCollection succeeds.
        • The abortReshardCollection command automatically implies writeConcern:majority.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              blake.oler Blake Oler
              Reporter:
              max.hirschhorn Max Hirschhorn
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: