summaryrefslogtreecommitdiff
path: root/src/mongo/client/remote_command_targeter.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-11-06 12:13:11 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-11-11 10:16:33 -0500
commit67b68b5f094d88753ae2fe14f6d708c9e5b4bfbd (patch)
tree17b708763cec3f17e0028c02edd3f54559a4804a /src/mongo/client/remote_command_targeter.h
parent3c090e1ad8b0f6d555396554abad7ea3747961af (diff)
downloadmongo-67b68b5f094d88753ae2fe14f6d708c9e5b4bfbd.tar.gz
SERVER-21272 Make replica set monitor retry finding hosts
This change makes the replica set monitor retry more than once to find hosts suitable for a given read preference and fail quickly if none of the hosts for a given replica set can be reached.
Diffstat (limited to 'src/mongo/client/remote_command_targeter.h')
-rw-r--r--src/mongo/client/remote_command_targeter.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/client/remote_command_targeter.h b/src/mongo/client/remote_command_targeter.h
index 40a92ea3cb6..ced4175e64c 100644
--- a/src/mongo/client/remote_command_targeter.h
+++ b/src/mongo/client/remote_command_targeter.h
@@ -58,11 +58,9 @@ public:
/**
* Obtains a host, which matches the read preferences specified by readPref.
*
- * Returns OK and a host and port to use for the specified read preference or any
- * ErrorCode. Known error codes are:
- * NotMaster if readPref is PrimaryOnly and there is no primary in the set
- * FailedToSatisfyReadPreference if it cannot find a node to match the read preference
- * and the readPref is anything other than PrimaryOnly
+ * Returns OK and a host and port to use for the specified read preference or an ErrorCode.
+ * Known error codes are:
+ * All error codes which can be returned by ReplicaSetMonitor::getHostOrRefresh.
*/
virtual StatusWith<HostAndPort> findHost(const ReadPreferenceSetting& readPref) = 0;