diff options
author | Spencer T Brody <spencer@mongodb.com> | 2016-08-26 17:47:07 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2016-08-29 18:13:12 -0400 |
commit | 973a02dac92d3d192fd5e98011c4c4704356c3e2 (patch) | |
tree | 84546958e4e5ba49f4e2a2839e274bbb7233ec3e /src/mongo/db/s | |
parent | 3f7812c99ded16e6286e1fd40323e57c939797ed (diff) | |
download | mongo-973a02dac92d3d192fd5e98011c4c4704356c3e2.tar.gz |
SERVER-25832 Rename Shard::runCommand to Shard::runCommandWithFixedRetryAttempts
Diffstat (limited to 'src/mongo/db/s')
-rw-r--r-- | src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/s/migration_source_manager.cpp | 13 | ||||
-rw-r--r-- | src/mongo/db/s/split_chunk_command.cpp | 13 |
3 files changed, 15 insertions, 13 deletions
diff --git a/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp b/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp index 117c45615e5..b2b5cce09cb 100644 --- a/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp +++ b/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp @@ -317,7 +317,7 @@ public: } auto applyOpsCommandResponse = - Grid::get(txn)->shardRegistry()->getConfigShard()->runCommand( + Grid::get(txn)->shardRegistry()->getConfigShard()->runCommandWithFixedRetryAttempts( txn, ReadPreferenceSetting{ReadPreference::PrimaryOnly}, nss.db().toString(), diff --git a/src/mongo/db/s/migration_source_manager.cpp b/src/mongo/db/s/migration_source_manager.cpp index 52a39d2606e..1744b1a9cde 100644 --- a/src/mongo/db/s/migration_source_manager.cpp +++ b/src/mongo/db/s/migration_source_manager.cpp @@ -321,12 +321,13 @@ Status MigrationSourceManager::commitDonateChunk(OperationContext* txn) { MONGO_FAIL_POINT_PAUSE_WHILE_SET(hangBeforeCommitMigration); - auto commitChunkMigrationResponse = grid.shardRegistry()->getConfigShard()->runCommand( - txn, - ReadPreferenceSetting{ReadPreference::PrimaryOnly}, - "admin", - builder.obj(), - Shard::RetryPolicy::kIdempotent); + auto commitChunkMigrationResponse = + grid.shardRegistry()->getConfigShard()->runCommandWithFixedRetryAttempts( + txn, + ReadPreferenceSetting{ReadPreference::PrimaryOnly}, + "admin", + builder.obj(), + Shard::RetryPolicy::kIdempotent); if (MONGO_FAIL_POINT(migrationCommitNetworkError)) { commitChunkMigrationResponse = Status( diff --git a/src/mongo/db/s/split_chunk_command.cpp b/src/mongo/db/s/split_chunk_command.cpp index 028adbd29a3..68823a03e60 100644 --- a/src/mongo/db/s/split_chunk_command.cpp +++ b/src/mongo/db/s/split_chunk_command.cpp @@ -355,12 +355,13 @@ public: auto configCmdObj = request.toConfigCommandBSON( BSON(WriteConcernOptions::kWriteConcernField << WriteConcernOptions::Majority)); - auto cmdResponseStatus = Grid::get(txn)->shardRegistry()->getConfigShard()->runCommand( - txn, - kPrimaryOnlyReadPreference, - "admin", - configCmdObj, - Shard::RetryPolicy::kIdempotent); + auto cmdResponseStatus = + Grid::get(txn)->shardRegistry()->getConfigShard()->runCommandWithFixedRetryAttempts( + txn, + kPrimaryOnlyReadPreference, + "admin", + configCmdObj, + Shard::RetryPolicy::kIdempotent); // // Refresh chunk metadata regardless of whether or not the split succeeded |