diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-11-06 12:13:25 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-11-11 10:16:34 -0500 |
commit | a707b9852bf6e03e7d6e6ef3ad464dbd28d690fa (patch) | |
tree | 8e85b0e4006ab2193a6e0b3245b57e3385ceb9b2 /src/mongo/client/remote_command_targeter_rs.cpp | |
parent | 67b68b5f094d88753ae2fe14f6d708c9e5b4bfbd (diff) | |
download | mongo-a707b9852bf6e03e7d6e6ef3ad464dbd28d690fa.tar.gz |
SERVER-21272 Make RemoteCommandTargeter use timeout for findHost
This change removes all back-off logic from ShardRegistry and
CatalogManagerReplicaSet and defers it all to the wait time capability of
the ReplicaSetMonitor (through RemoteCommandTargeter).
Diffstat (limited to 'src/mongo/client/remote_command_targeter_rs.cpp')
-rw-r--r-- | src/mongo/client/remote_command_targeter_rs.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/client/remote_command_targeter_rs.cpp b/src/mongo/client/remote_command_targeter_rs.cpp index 6cd828c3d38..429798ec40d 100644 --- a/src/mongo/client/remote_command_targeter_rs.cpp +++ b/src/mongo/client/remote_command_targeter_rs.cpp @@ -58,8 +58,9 @@ ConnectionString RemoteCommandTargeterRS::connectionString() { return fassertStatusOK(28712, ConnectionString::parse(_rsMonitor->getServerAddress())); } -StatusWith<HostAndPort> RemoteCommandTargeterRS::findHost(const ReadPreferenceSetting& readPref) { - return _rsMonitor->getHostOrRefresh(readPref); +StatusWith<HostAndPort> RemoteCommandTargeterRS::findHost(const ReadPreferenceSetting& readPref, + Milliseconds maxWait) { + return _rsMonitor->getHostOrRefresh(readPref, maxWait); } void RemoteCommandTargeterRS::markHostNotMaster(const HostAndPort& host) { |