summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2016-07-26 15:23:10 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2016-07-26 15:23:51 -0400
commit1febb4ceb0e59743b0a49af35db10c4c689aa130 (patch)
tree431445a395fd4fbd1e7c94bf1c4151bba714088d /src/mongo/db/repl
parent7daf57f28f564329e92b8779cf12845776b958b3 (diff)
downloadmongo-1febb4ceb0e59743b0a49af35db10c4c689aa130.tar.gz
SERVER-24615 Add support for OperationContext in EgressMetadataHook
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r--src/mongo/db/repl/check_quorum_for_config_change.cpp1
-rw-r--r--src/mongo/db/repl/databases_cloner.cpp3
-rw-r--r--src/mongo/db/repl/elect_cmd_runner.cpp1
-rw-r--r--src/mongo/db/repl/elect_cmd_runner_test.cpp1
-rw-r--r--src/mongo/db/repl/freshness_checker.cpp1
-rw-r--r--src/mongo/db/repl/freshness_checker_test.cpp1
-rw-r--r--src/mongo/db/repl/freshness_scanner.cpp2
-rw-r--r--src/mongo/db/repl/freshness_scanner_test.cpp1
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp4
-rw-r--r--src/mongo/db/repl/reporter.cpp2
-rw-r--r--src/mongo/db/repl/rollback_checker.cpp2
-rw-r--r--src/mongo/db/repl/scatter_gather_test.cpp2
-rw-r--r--src/mongo/db/repl/vote_requester.cpp2
-rw-r--r--src/mongo/db/repl/vote_requester_test.cpp1
14 files changed, 16 insertions, 8 deletions
diff --git a/src/mongo/db/repl/check_quorum_for_config_change.cpp b/src/mongo/db/repl/check_quorum_for_config_change.cpp
index 583b3df37d8..bd3740ed410 100644
--- a/src/mongo/db/repl/check_quorum_for_config_change.cpp
+++ b/src/mongo/db/repl/check_quorum_for_config_change.cpp
@@ -103,6 +103,7 @@ std::vector<RemoteCommandRequest> QuorumChecker::getRequests() const {
"admin",
hbRequest,
BSON(rpc::kReplSetMetadataFieldName << 1),
+ nullptr,
_rsConfig->getHeartbeatTimeoutPeriodMillis()));
}
diff --git a/src/mongo/db/repl/databases_cloner.cpp b/src/mongo/db/repl/databases_cloner.cpp
index dd7e8e6996c..c0155d8fcb7 100644
--- a/src/mongo/db/repl/databases_cloner.cpp
+++ b/src/mongo/db/repl/databases_cloner.cpp
@@ -161,7 +161,8 @@ Status DatabasesCloner::startup() {
Request listDBsReq(_source,
"admin",
BSON("listDatabases" << true),
- rpc::ServerSelectionMetadata(true, boost::none).toBSON());
+ rpc::ServerSelectionMetadata(true, boost::none).toBSON(),
+ nullptr);
_listDBsScheduler = stdx::make_unique<RemoteCommandRetryScheduler>(
_exec,
listDBsReq,
diff --git a/src/mongo/db/repl/elect_cmd_runner.cpp b/src/mongo/db/repl/elect_cmd_runner.cpp
index dc2bb2e240d..afe28960c1f 100644
--- a/src/mongo/db/repl/elect_cmd_runner.cpp
+++ b/src/mongo/db/repl/elect_cmd_runner.cpp
@@ -80,6 +80,7 @@ std::vector<RemoteCommandRequest> ElectCmdRunner::Algorithm::getRequests() const
*it,
"admin",
replSetElectCmd,
+ nullptr,
Milliseconds(30 * 1000))); // trying to match current Socket timeout
}
diff --git a/src/mongo/db/repl/elect_cmd_runner_test.cpp b/src/mongo/db/repl/elect_cmd_runner_test.cpp
index c92f931cf34..593b1f10fc7 100644
--- a/src/mongo/db/repl/elect_cmd_runner_test.cpp
+++ b/src/mongo/db/repl/elect_cmd_runner_test.cpp
@@ -287,6 +287,7 @@ protected:
return RemoteCommandRequest(HostAndPort(hostname),
"", // the non-hostname fields do not matter for Elect
BSONObj(),
+ nullptr,
Milliseconds(0));
}
diff --git a/src/mongo/db/repl/freshness_checker.cpp b/src/mongo/db/repl/freshness_checker.cpp
index f5bd3963e63..d3927c33102 100644
--- a/src/mongo/db/repl/freshness_checker.cpp
+++ b/src/mongo/db/repl/freshness_checker.cpp
@@ -98,6 +98,7 @@ std::vector<RemoteCommandRequest> FreshnessChecker::Algorithm::getRequests() con
*it,
"admin",
replSetFreshCmd,
+ nullptr,
Milliseconds(30 * 1000))); // trying to match current Socket timeout
}
diff --git a/src/mongo/db/repl/freshness_checker_test.cpp b/src/mongo/db/repl/freshness_checker_test.cpp
index 2d0917254ec..2aef6f626df 100644
--- a/src/mongo/db/repl/freshness_checker_test.cpp
+++ b/src/mongo/db/repl/freshness_checker_test.cpp
@@ -947,6 +947,7 @@ protected:
return RemoteCommandRequest(HostAndPort(hostname),
"", // the non-hostname fields do not matter in Freshness
BSONObj(),
+ nullptr,
Milliseconds(0));
}
diff --git a/src/mongo/db/repl/freshness_scanner.cpp b/src/mongo/db/repl/freshness_scanner.cpp
index fcba850e021..87182309a39 100644
--- a/src/mongo/db/repl/freshness_scanner.cpp
+++ b/src/mongo/db/repl/freshness_scanner.cpp
@@ -64,7 +64,7 @@ std::vector<RemoteCommandRequest> FreshnessScanner::Algorithm::getRequests() con
std::vector<RemoteCommandRequest> requests;
for (auto& target : _targets) {
- requests.push_back(RemoteCommandRequest(target, "admin", getStatusCmd, _timeout));
+ requests.push_back(RemoteCommandRequest(target, "admin", getStatusCmd, nullptr, _timeout));
}
return requests;
}
diff --git a/src/mongo/db/repl/freshness_scanner_test.cpp b/src/mongo/db/repl/freshness_scanner_test.cpp
index 53314298b5b..d931ef55b70 100644
--- a/src/mongo/db/repl/freshness_scanner_test.cpp
+++ b/src/mongo/db/repl/freshness_scanner_test.cpp
@@ -99,6 +99,7 @@ protected:
return RemoteCommandRequest(HostAndPort(hostname),
"", // fields do not matter in FreshnessScanner
BSONObj(),
+ nullptr,
Milliseconds(0));
}
diff --git a/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp b/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp
index fb88d374e93..e56fa347fcd 100644
--- a/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp
@@ -95,7 +95,7 @@ void ReplicationCoordinatorImpl::_doMemberHeartbeat(ReplicationExecutor::Callbac
}
const RemoteCommandRequest request(
- target, "admin", heartbeatObj, BSON(rpc::kReplSetMetadataFieldName << 1), timeout);
+ target, "admin", heartbeatObj, BSON(rpc::kReplSetMetadataFieldName << 1), nullptr, timeout);
const ReplicationExecutor::RemoteCommandCallbackFn callback =
stdx::bind(&ReplicationCoordinatorImpl::_handleHeartbeatResponse,
this,
@@ -304,7 +304,7 @@ void remoteStepdownCallback(const ReplicationExecutor::RemoteCommandCallbackArgs
} // namespace
void ReplicationCoordinatorImpl::_requestRemotePrimaryStepdown(const HostAndPort& target) {
- RemoteCommandRequest request(target, "admin", BSON("replSetStepDown" << 20));
+ RemoteCommandRequest request(target, "admin", BSON("replSetStepDown" << 20), nullptr);
log() << "Requesting " << target << " step down from primary";
CBHStatus cbh = _replExecutor.scheduleRemoteCommand(request, remoteStepdownCallback);
diff --git a/src/mongo/db/repl/reporter.cpp b/src/mongo/db/repl/reporter.cpp
index e5dfdab34da..2e19e804108 100644
--- a/src/mongo/db/repl/reporter.cpp
+++ b/src/mongo/db/repl/reporter.cpp
@@ -229,7 +229,7 @@ void Reporter::_sendCommand_inlock(BSONObj commandRequest) {
<< commandRequest;
auto scheduleResult = _executor->scheduleRemoteCommand(
- executor::RemoteCommandRequest(_target, "admin", commandRequest),
+ executor::RemoteCommandRequest(_target, "admin", commandRequest, nullptr),
stdx::bind(&Reporter::_processResponseCallback, this, stdx::placeholders::_1));
_status = scheduleResult.getStatus();
diff --git a/src/mongo/db/repl/rollback_checker.cpp b/src/mongo/db/repl/rollback_checker.cpp
index cb86eb2a811..3e6d49026b2 100644
--- a/src/mongo/db/repl/rollback_checker.cpp
+++ b/src/mongo/db/repl/rollback_checker.cpp
@@ -140,7 +140,7 @@ bool RollbackChecker::_checkForRollback_inlock(int remoteRBID) {
RollbackChecker::CallbackHandle RollbackChecker::_scheduleGetRollbackId(
const RemoteCommandCallbackFn& nextAction, const CallbackFn& errorFn) {
executor::RemoteCommandRequest getRollbackIDReq(
- _syncSource, "admin", BSON("replSetGetRBID" << 1));
+ _syncSource, "admin", BSON("replSetGetRBID" << 1), nullptr);
auto cbh = _executor->scheduleRemoteCommand(getRollbackIDReq, nextAction);
if (cbh.getStatus() == ErrorCodes::ShutdownInProgress) {
diff --git a/src/mongo/db/repl/scatter_gather_test.cpp b/src/mongo/db/repl/scatter_gather_test.cpp
index 05edf467fbd..e231c251d35 100644
--- a/src/mongo/db/repl/scatter_gather_test.cpp
+++ b/src/mongo/db/repl/scatter_gather_test.cpp
@@ -61,7 +61,7 @@ public:
std::vector<RemoteCommandRequest> requests;
for (int i = 0; i < kTotalRequests; i++) {
requests.push_back(RemoteCommandRequest(
- HostAndPort("hostname", i), "admin", BSONObj(), Milliseconds(30 * 1000)));
+ HostAndPort("hostname", i), "admin", BSONObj(), nullptr, Milliseconds(30 * 1000)));
}
return requests;
}
diff --git a/src/mongo/db/repl/vote_requester.cpp b/src/mongo/db/repl/vote_requester.cpp
index 836617e5493..b02b3bb7c0c 100644
--- a/src/mongo/db/repl/vote_requester.cpp
+++ b/src/mongo/db/repl/vote_requester.cpp
@@ -82,7 +82,7 @@ std::vector<RemoteCommandRequest> VoteRequester::Algorithm::getRequests() const
std::vector<RemoteCommandRequest> requests;
for (const auto& target : _targets) {
requests.push_back(RemoteCommandRequest(
- target, "admin", requestVotesCmd, _rsConfig.getElectionTimeoutPeriod()));
+ target, "admin", requestVotesCmd, nullptr, _rsConfig.getElectionTimeoutPeriod()));
}
return requests;
diff --git a/src/mongo/db/repl/vote_requester_test.cpp b/src/mongo/db/repl/vote_requester_test.cpp
index ba4691019d8..799fff1817c 100644
--- a/src/mongo/db/repl/vote_requester_test.cpp
+++ b/src/mongo/db/repl/vote_requester_test.cpp
@@ -124,6 +124,7 @@ protected:
return RemoteCommandRequest(HostAndPort(hostname),
"", // fields do not matter in VoteRequester
BSONObj(),
+ nullptr,
Milliseconds(0));
}