[SERVER-57624] Coordinator should check participant states first before waiting Created: 10/Jun/21  Updated: 08/Jul/21  Resolved: 08/Jul/21

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

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-50937 Make resharding coordinator support r... Closed
Operating System: ALL
Sprint: Sharding 2021-07-12
Participants:
Story Points: 2

 Description   

The resharding coordinator has a couple of _awaitAll* methods that waits for certain SharedPromise in the ReshardingCoordinatorObserver to get set. However, these promises are not properly set whenever a resharding resumes from a step up, so the coordinator should check if the condition it needs to wait on has already been met before attempting to wait.



 Comments   
Comment by Randolph Tan [ 08/Jul/21 ]

This was fixed in https://github.com/mongodb/mongo/commit/cbddf73dc78aa6a208fe3a43ca5e8674f67d5b87

Comment by Randolph Tan [ 01/Jul/21 ]

Note that donor and recipients don't have this problem because we force refresh during step up, this will effectively end up calling onReshardingFieldsChanges and update the promises.

Comment by Randolph Tan [ 10/Jun/21 ]

An alternative solution is to call ReshardingCoordinatorObserver::onReshardingParticipantTransition with the latest coordinator doc anytime after step up and before the first call to awaitAll*.

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