diff options
Diffstat (limited to 'src/mongo/db/s/resharding/resharding_coordinator_observer.cpp')
-rw-r--r-- | src/mongo/db/s/resharding/resharding_coordinator_observer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/s/resharding/resharding_coordinator_observer.cpp b/src/mongo/db/s/resharding/resharding_coordinator_observer.cpp index 0522ac65ef4..2cc932b201e 100644 --- a/src/mongo/db/s/resharding/resharding_coordinator_observer.cpp +++ b/src/mongo/db/s/resharding/resharding_coordinator_observer.cpp @@ -275,6 +275,15 @@ void ReshardingCoordinatorObserver::interrupt(Status status) { } } +void ReshardingCoordinatorObserver::onCriticalSectionTimeout() { + stdx::lock_guard<Latch> lk(_mutex); + if (!_allRecipientsReportedStrictConsistencyTimestamp.getFuture().isReady()) { + _allRecipientsReportedStrictConsistencyTimestamp.setError( + Status{ErrorCodes::ReshardingCriticalSectionTimeout, + "Resharding critical section timed out."}); + } +} + void ReshardingCoordinatorObserver::_onAbortOrStepdown(WithLock, Status status) { if (!_allDonorsReportedMinFetchTimestamp.getFuture().isReady()) { _allDonorsReportedMinFetchTimestamp.setError(status); |