summaryrefslogtreecommitdiff
path: root/src/mongo/client/remote_command_targeter_mock.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2016-09-06 16:57:35 -0400
committerAndy Schwerin <schwerin@mongodb.com>2016-09-07 09:26:50 -0400
commit645a77b3fa5b28d29d245e30cc195fd5a8eda049 (patch)
treed91a9bc7ed7012e753ec8d92859f7f342a994f86 /src/mongo/client/remote_command_targeter_mock.cpp
parent1f389ce467330cda1171d2a04bd0e0b2890aaf8d (diff)
downloadmongo-645a77b3fa5b28d29d245e30cc195fd5a8eda049.tar.gz
SERVER-24600 Increase interruptibility of RemoteCommandTargeter::findHost.
By making more calls of RemoteCommandTargeter::findHost interruptible, this change speeds up the shutdown of mongos when no config servers are discoverable.
Diffstat (limited to 'src/mongo/client/remote_command_targeter_mock.cpp')
-rw-r--r--src/mongo/client/remote_command_targeter_mock.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/client/remote_command_targeter_mock.cpp b/src/mongo/client/remote_command_targeter_mock.cpp
index 73ee8de2e0e..617efb699fc 100644
--- a/src/mongo/client/remote_command_targeter_mock.cpp
+++ b/src/mongo/client/remote_command_targeter_mock.cpp
@@ -52,8 +52,14 @@ ConnectionString RemoteCommandTargeterMock::connectionString() {
return _connectionStringReturnValue;
}
-StatusWith<HostAndPort> RemoteCommandTargeterMock::findHost(const ReadPreferenceSetting& readPref,
- Milliseconds maxWait) {
+StatusWith<HostAndPort> RemoteCommandTargeterMock::findHost(OperationContext* txn,
+ const ReadPreferenceSetting& readPref) {
+ return _findHostReturnValue;
+}
+
+StatusWith<HostAndPort> RemoteCommandTargeterMock::findHostWithMaxWait(
+ const ReadPreferenceSetting& readPref, Milliseconds maxTime) {
+
return _findHostReturnValue;
}