summaryrefslogtreecommitdiff
path: root/src/mongo/s/client/shard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/client/shard.cpp')
-rw-r--r--src/mongo/s/client/shard.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/mongo/s/client/shard.cpp b/src/mongo/s/client/shard.cpp
index 445b63b3dbe..622c6ea7c50 100644
--- a/src/mongo/s/client/shard.cpp
+++ b/src/mongo/s/client/shard.cpp
@@ -106,7 +106,7 @@ StatusWith<Shard::CommandResponse> Shard::runCommand(OperationContext* txn,
const std::string& dbName,
const BSONObj& cmdObj,
RetryPolicy retryPolicy) {
- return runCommand(txn, readPref, dbName, cmdObj, Milliseconds::max(), retryPolicy);
+ MONGO_UNREACHABLE;
}
StatusWith<Shard::CommandResponse> Shard::runCommand(OperationContext* txn,
@@ -115,6 +115,26 @@ StatusWith<Shard::CommandResponse> Shard::runCommand(OperationContext* txn,
const BSONObj& cmdObj,
Milliseconds maxTimeMSOverride,
RetryPolicy retryPolicy) {
+ MONGO_UNREACHABLE;
+}
+
+StatusWith<Shard::CommandResponse> Shard::runCommandWithFixedRetryAttempts(
+ OperationContext* txn,
+ const ReadPreferenceSetting& readPref,
+ const std::string& dbName,
+ const BSONObj& cmdObj,
+ RetryPolicy retryPolicy) {
+ return runCommandWithFixedRetryAttempts(
+ txn, readPref, dbName, cmdObj, Milliseconds::max(), retryPolicy);
+}
+
+StatusWith<Shard::CommandResponse> Shard::runCommandWithFixedRetryAttempts(
+ OperationContext* txn,
+ const ReadPreferenceSetting& readPref,
+ const std::string& dbName,
+ const BSONObj& cmdObj,
+ Milliseconds maxTimeMSOverride,
+ RetryPolicy retryPolicy) {
for (int retry = 1; retry <= kOnErrorNumRetries; ++retry) {
auto hostWithResponse = _runCommand(txn, readPref, dbName, maxTimeMSOverride, cmdObj);
auto swCmdResponse = std::move(hostWithResponse.commandResponse);