summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replication_coordinator_impl.h
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2017-09-13 15:48:45 -0400
committerSpencer T Brody <spencer@mongodb.com>2017-09-15 11:20:37 -0400
commit267a4d08d5d9fb0e56ac27aac7666ab3487fd222 (patch)
treed64c609f7f0394ad540194a2b72deb2f16532d2d /src/mongo/db/repl/replication_coordinator_impl.h
parentf89bcc57d5526c02e4be67ab2cbb3f5470ee3aa0 (diff)
downloadmongo-267a4d08d5d9fb0e56ac27aac7666ab3487fd222.tar.gz
SERVER-28544 Push logic from ReplicationCoordinatorImpl::_tryToStepDown into TopologyCoordinator
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_impl.h')
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.h b/src/mongo/db/repl/replication_coordinator_impl.h
index 04b1983d1cf..12ab02dbff2 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.h
+++ b/src/mongo/db/repl/replication_coordinator_impl.h
@@ -53,6 +53,7 @@
#include "mongo/platform/unordered_set.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/mutex.h"
+#include "mongo/util/concurrency/with_lock.h"
#include "mongo/util/net/hostandport.h"
namespace mongo {
@@ -639,12 +640,9 @@ private:
/**
* Non-blocking helper method for the stepDown method, that represents executing
- * one attempt to step down. See implementation of this method and stepDown for
- * details.
- *
- * TODO(spencer): Move the bulk of this method into the TopologyCoordinator.
+ * one attempt to step down.
*/
- bool _tryToStepDown_inlock(Date_t waitUntil, Date_t stepdownUntil, bool force);
+ bool _tryToStepDown(WithLock, Date_t waitUntil, Date_t stepdownUntil, bool force);
bool _canAcceptWritesFor_inlock(const NamespaceString& ns);