summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Hernandez <scotthernandez@gmail.com>2014-10-15 10:45:45 -0400
committerScott Hernandez <scotthernandez@gmail.com>2014-10-17 11:31:49 -0400
commitaaf740d1748b5ed1ce890d88c489bd6f9399aeac (patch)
tree03cdb7a1ecc40138981daaefe55778fa7851bf4d /src
parent8e4cff01187584f65e3439c0c2a0a2e0d63d594d (diff)
downloadmongo-aaf740d1748b5ed1ce890d88c489bd6f9399aeac.tar.gz
SERVER-14982: don't take lock to schedule maint mode
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/repl/repl_coordinator_impl.cpp6
-rw-r--r--src/mongo/db/repl/repl_coordinator_legacy.cpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/db/repl/repl_coordinator_impl.cpp b/src/mongo/db/repl/repl_coordinator_impl.cpp
index ac546a5f121..e49ae2e216f 100644
--- a/src/mongo/db/repl/repl_coordinator_impl.cpp
+++ b/src/mongo/db/repl/repl_coordinator_impl.cpp
@@ -1144,6 +1144,10 @@ namespace {
}
fassert(18640, cbh.getStatus());
_replExecutor.wait(cbh.getValue());
+
+ // TODO: Remove after legacy replication coordinator is deleted
+ response->append("replCoord", "impl");
+
return result;
}
@@ -1203,7 +1207,7 @@ namespace {
Status ReplicationCoordinatorImpl::setMaintenanceMode(OperationContext* txn, bool activate) {
Status result(ErrorCodes::InternalError, "didn't set status in _setMaintenanceMode_helper");
- CBHStatus cbh = _replExecutor.scheduleWorkWithGlobalExclusiveLock(
+ CBHStatus cbh = _replExecutor.scheduleWork(
stdx::bind(&ReplicationCoordinatorImpl::_setMaintenanceMode_helper,
this,
stdx::placeholders::_1,
diff --git a/src/mongo/db/repl/repl_coordinator_legacy.cpp b/src/mongo/db/repl/repl_coordinator_legacy.cpp
index 367294594b6..cbe67171be5 100644
--- a/src/mongo/db/repl/repl_coordinator_legacy.cpp
+++ b/src/mongo/db/repl/repl_coordinator_legacy.cpp
@@ -549,6 +549,8 @@ namespace {
Status LegacyReplicationCoordinator::processReplSetGetStatus(BSONObjBuilder* result) {
theReplSet->summarizeStatus(*result);
+ // NOTE: The following field is for debugging only and not part of the interface.
+ result->append("replCoord", "legacy");
return Status::OK();
}