[SERVER-58980] Prevent Resharding Coordinator StepDownStepUpEachTransition test race between stepdown and done Created: 30/Jul/21  Updated: 29/Oct/23  Resolved: 14/Sep/21

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

Type: Task Priority: Major - P3
Reporter: Haley Connelly Assignee: Luis Osta (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Sharding 2021-09-20
Participants:
Linked BF Score: 29
Story Points: 1

 Description   

If the coordinator finishes transitioning to done before stepdown, the completion promise will be fulfilled with Status::OK instead of InterruptedDueToReplStateChange and cause this assert to fail.

kDone is different than the other state transitions since the coordinator doesn't actually persist its state of kDone to the ReshardingCoordinatorDocument on disk. Instead, if the in-memory state indicates kDone, the coordinator deletes the document altogether

Potential fix: remove kDone from the state guarded transitions and potentially add a new test case with an alternative approach if we want the test coverage.



 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 [ 22/Sep/21 ]

Author:

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

Message: SERVER-58980 remove kDone from the coordinatorStates
Branch: v5.0
https://github.com/mongodb/mongo/commit/864585ec02d68b67f5e14a375de9c7fbdc49d030

Comment by Githook User [ 14/Sep/21 ]

Author:

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

Message: SERVER-58980 remove kDone from the coordinatorStates
Branch: master
https://github.com/mongodb/mongo/commit/c963faf497cd15e36acfb39f1197ee6d42c920e6

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