summaryrefslogtreecommitdiff
path: root/src/mongo/s/client/shard.h
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2016-08-26 17:47:07 -0400
committerSpencer T Brody <spencer@mongodb.com>2016-08-29 18:13:12 -0400
commit973a02dac92d3d192fd5e98011c4c4704356c3e2 (patch)
tree84546958e4e5ba49f4e2a2839e274bbb7233ec3e /src/mongo/s/client/shard.h
parent3f7812c99ded16e6286e1fd40323e57c939797ed (diff)
downloadmongo-973a02dac92d3d192fd5e98011c4c4704356c3e2.tar.gz
SERVER-25832 Rename Shard::runCommand to Shard::runCommandWithFixedRetryAttempts
Diffstat (limited to 'src/mongo/s/client/shard.h')
-rw-r--r--src/mongo/s/client/shard.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mongo/s/client/shard.h b/src/mongo/s/client/shard.h
index 96dfecd204c..1f3866e84e3 100644
--- a/src/mongo/s/client/shard.h
+++ b/src/mongo/s/client/shard.h
@@ -160,6 +160,31 @@ public:
RetryPolicy retryPolicy);
/**
+ * Same as runCommand, but will only retry failed operations up to 3 times, regardless of
+ * the retryPolicy or the remaining maxTimeMs.
+ * Wherever possible this method should be avoided in favor of runCommand.
+ */
+ StatusWith<CommandResponse> runCommandWithFixedRetryAttempts(
+ OperationContext* txn,
+ const ReadPreferenceSetting& readPref,
+ const std::string& dbName,
+ const BSONObj& cmdObj,
+ RetryPolicy retryPolicy);
+
+ /**
+ * Same as runCommand, but will only retry failed operations up to 3 times, regardless of
+ * the retryPolicy or the remaining maxTimeMs.
+ * Wherever possible this method should be avoided in favor of runCommand.
+ */
+ StatusWith<CommandResponse> runCommandWithFixedRetryAttempts(
+ OperationContext* txn,
+ const ReadPreferenceSetting& readPref,
+ const std::string& dbName,
+ const BSONObj& cmdObj,
+ Milliseconds maxTimeMSOverride,
+ RetryPolicy retryPolicy);
+
+ /**
* Expects a single-entry batch wrtie command and runs it on the config server's primary using
* the specified retry policy.
*/