[SERVER-81816] ReshardingCoordinatorObserver destructor should only invariant if ReshardingCoordinatorService::run() is called Created: 03/Oct/23  Updated: 12/Dec/23

Status: Backlog
Project: Core Server
Component/s: Sharding
Affects Version/s: 5.0.0, 6.0.0, 6.1.0, 7.0.0, 6.2.0-rc6, 7.2.0-rc0, 7.1.0-rc5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Abdul Qadeer Assignee: Backlog - Cluster Scalability
Resolution: Unresolved Votes: 0
Labels: cs-subteam1, sharding-nyc-subteam1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Assigned Teams:
Cluster Scalability
Operating System: ALL
Participants:
Linked BF Score: 0
Story Points: 2

 Description   

In BF-30149 it was found that in very rare cases it is possible for ReshardingCoordinator Instance to be destroyed before Instance::run() is called by the POS framework as described in this comment. In this case the ReshardingCoordinator destructor would be called following which ReshardingCoordinatorOpObserver destructor would invariant on promises:

ReshardingCoordinatorObserver::~ReshardingCoordinatorObserver() {
    stdx::lock_guard<Latch> lg(_mutex);
    invariant(_allDonorsReportedMinFetchTimestamp.getFuture().isReady());
    invariant(_allRecipientsFinishedCloning.getFuture().isReady());
    invariant(_allRecipientsReportedStrictConsistencyTimestamp.getFuture().isReady());
    invariant(_allRecipientsDone.getFuture().isReady());
    invariant(_allDonorsDone.getFuture().isReady());
}

We should pass through the invariant checks if Instance::run() is not called.


Generated at Thu Feb 08 06:47:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.