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

Add abortReshardCollection command for users to cancel the resharding operation

    • Fully Compatible
    • Sharding 2021-02-22, Sharding 2021-03-08, Sharding 2021-03-22, Sharding 2021-04-05
    • 165
    • 3

      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.

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

              Created:
              Updated:
              Resolved: