[SERVER-56606] Only indicate cancelation to resharding metrics on participant shards if the userCanceled field is set to true Created: 04/May/21  Updated: 29/Oct/23  Resolved: 15/Jun/21

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

Type: Task Priority: Major - P3
Reporter: Blake Oler Assignee: Luis Osta (Inactive)
Resolution: Fixed Votes: 0
Labels: PM-234-M3, PM-234-T-autocommits, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-55511 Handle recovery for resharding recipi... Closed
depends on SERVER-56567 Add boolean field to reshardingFields... Closed
Gantt Dependency
has to be done after SERVER-57260 Plumb through userCanceled to the _sh... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Sharding 2021-05-17, Sharding 2021-06-14, Sharding 2021-06-28, Sharding 2021-05-31
Participants:
Story Points: 1

 Description   

Do the following on the recipient first – unsure at this time if the donor is ready for this.

  1. Make userCanceled a class member of participants of type boost::optional<bool>.
  2. This class member will be populated from two different sources, either the onReshardingFieldsChanges() or abort() directly from the shard's abortReshardCollection command. Both of these sources go through the abort() command eventually, so you can populate the class member there.
  3. Refer to userCanceled here, where you will indicate kCanceled if aborted == true && userCanceled == true, kFailure if aborted == true && userCanceled == false, and kSuccess otherwise.
  4. Try removing this call to onCompletion. If tests fail, keep it for now.


 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 16/Jun/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-56606: Only indicate cancelation to resharding metrics on participant shards if the userCanceled field is set to true

(cherry picked from commit c43bbbfc6f21d47327a963d4cadb78e05188c875)
Branch: v5.0
https://github.com/mongodb/mongo/commit/1cf82af0ddf134ae2b85f8d5a0c8e5430fb8b863

Comment by Githook User [ 16/Jun/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-56606 Only indicate cancelation to resharding metrics on participant shards if the userCanceled field is set to true
Branch: SERVER-34632
https://github.com/mongodb/mongo/commit/c43bbbfc6f21d47327a963d4cadb78e05188c875

Comment by Githook User [ 15/Jun/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-56606 Only indicate cancelation to resharding metrics on participant shards if the userCanceled field is set to true
Branch: master
https://github.com/mongodb/mongo/commit/c43bbbfc6f21d47327a963d4cadb78e05188c875

Comment by Luis Osta (Inactive) [ 08/Jun/21 ]

max.hirschhorn Sounds good that was addressed in SERVER-57260

Comment by Luis Osta (Inactive) [ 08/Jun/21 ]

blake.oler The call to onCompletion can't be removed as it triggers this invariant.

So we'll go forward with the ticket keeping that intact.

Comment by Max Hirschhorn [ 24/May/21 ]

I'd expect after the changes from SERVER-56638 that the userCanceled option must also be added to the _shardsvrAbortReshardCollection command as an argument and plumbed through DonorStateMachine::abort() and RecipientStateMachine::abort().

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