summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2016-09-08 09:12:58 -0400
committerEric Milkie <milkie@10gen.com>2016-09-08 09:12:58 -0400
commit803d0a0d56690ebb11dead6beb541517a944ef4a (patch)
treeb37bc709cf3fe8075a8e56bc6fa8a262f4ab7466 /src/mongo/db/repl
parent02cf794bf0e942b2c1dd12d59fc9b3cf45e62f91 (diff)
downloadmongo-803d0a0d56690ebb11dead6beb541517a944ef4a.tar.gz
Revert "SERVER-25666 add invariants to ensure proper primary transition state changes"
This reverts commit 2ef0fbc8fe0c1a483080d2ddcdcd35dd94093487.
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp
index 85a98cb6674..09df360bf92 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -902,7 +902,6 @@ void ReplicationCoordinatorImpl::signalDrainComplete(OperationContext* txn) {
return;
}
- invariant(!_canAcceptNonLocalWrites);
_canAcceptNonLocalWrites = true;
lk.unlock();
@@ -2638,8 +2637,6 @@ ReplicationCoordinatorImpl::_updateMemberStateFromTopologyCoordinator_inlock() {
_replicationWaiterList.signalAndRemoveAll_inlock();
// Wake up the optime waiter that is waiting for primary catch-up to finish.
_opTimeWaiterList.signalAndRemoveAll_inlock();
- invariant(!_isCatchingUp);
- invariant(!_isWaitingForDrainToComplete);
_canAcceptNonLocalWrites = false;
result = kActionCloseAllConnections;
} else {
@@ -2739,8 +2736,6 @@ void ReplicationCoordinatorImpl::_performPostMemberStateUpdateAction(
_electionId = OID::gen();
}
_topCoord->processWinElection(_electionId, getNextGlobalTimestamp());
- invariant(!_isCatchingUp);
- invariant(!_isWaitingForDrainToComplete);
_isCatchingUp = true;
const PostMemberStateUpdateAction nextAction =
_updateMemberStateFromTopologyCoordinator_inlock();
@@ -2850,11 +2845,9 @@ void ReplicationCoordinatorImpl::_catchUpOplogToLatest_inlock(const FreshnessSca
}
void ReplicationCoordinatorImpl::_finishCatchUpOplog_inlock(bool startToDrain) {
- invariant(_isCatchingUp);
_isCatchingUp = false;
// If the node steps down during the catch-up, we don't go into drain mode.
if (startToDrain) {
- invariant(!_isWaitingForDrainToComplete);
_isWaitingForDrainToComplete = true;
// Signal applier in executor to avoid the deadlock with bgsync's mutex that is required to
// cancel fetcher.