[SERVER-52770] Add abortReshardCollection command for users to cancel the resharding operation Created: 11/Nov/20  Updated: 29/Oct/23  Resolved: 29/Mar/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Blake Oler
Resolution: Fixed Votes: 0
Labels: PM-234-M3, PM-234-T-autocommits
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-54456 Fix resharding class mutex handling a... Closed
is depended on by SERVER-53923 Enforce reshardingCriticalSectionTime... Closed
is depended on by SERVER-50694 Ensure that resharding operations hav... Closed
Documented
is documented by DOCS-14318 Investigate changes in SERVER-52770: ... Closed
Gantt Dependency
has to be done before SERVER-55100 Test functionality of aborting a resh... Closed
Problem/Incident
Related
related to SERVER-61483 Resharding coordinator fails to recov... Closed
related to SERVER-55600 Indicate to resharding metrics system... Closed
is related to SERVER-53792 Remove CoordinatorStateEnum::kError Closed
is related to SERVER-54000 Make errors propagate from the Reshar... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2021-02-22, Sharding 2021-03-08, Sharding 2021-03-22, Sharding 2021-04-05
Participants:
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.


 Comments   
Comment by Githook User [ 29/Mar/21 ]

Author:

{'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}

Message: SERVER-52770 Add abortReshardCollection command for users to cancel the resharding operation
Branch: master
https://github.com/mongodb/mongo/commit/5103a49830ec4e13c770cd3e2af4661fd8bf0d3f

Generated at Thu Feb 08 05:28:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.