diff options
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_impl.cpp')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index 5634f1db32a..2044b43439f 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -529,7 +529,11 @@ Status ReplicationCoordinatorImpl::waitForMemberState(MemberState expectedState, Seconds ReplicationCoordinatorImpl::getSlaveDelaySecs() const { stdx::lock_guard<stdx::mutex> lk(_mutex); invariant(_rsConfig.isInitialized()); - uassert(28524, "Node not a member of the current set configuration", _selfIndex != -1); + if (_selfIndex == -1) { + // We aren't currently in the set. Return 0 seconds so we can clear out the applier's + // queue of work. + return Seconds(0); + } return _rsConfig.getMemberAt(_selfIndex).getSlaveDelay(); } |