From 7614c0eb2449eb4ec22d21b677177124d61f1888 Mon Sep 17 00:00:00 2001 From: Spencer T Brody Date: Fri, 26 Aug 2016 17:47:07 -0400 Subject: SERVER-25832 Rename Shard::runCommand to Shard::runCommandWithFixedRetryAttempts --- src/mongo/s/client/shard.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/mongo/s/client/shard.cpp') 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::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::runCommand(OperationContext* txn, @@ -115,6 +115,26 @@ StatusWith Shard::runCommand(OperationContext* txn, const BSONObj& cmdObj, Milliseconds maxTimeMSOverride, RetryPolicy retryPolicy) { + MONGO_UNREACHABLE; +} + +StatusWith 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::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); -- cgit v1.2.1