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-26 18:23:45 -0400 |
commit | 7614c0eb2449eb4ec22d21b677177124d61f1888 (patch) | |
tree | 270f40e904bec17cbb30f696450e3401cfe03172 /src/mongo/db/s | |
parent | ff52022e5cd7ff7c75daf24c8760f0377785ba1e (diff) | |
download | mongo-7614c0eb2449eb4ec22d21b677177124d61f1888.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 59b234f5eae..ece43e1b676 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 @@ -273,7 +273,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 f1bb4701e34..9fdd4f04a83 100644 --- a/src/mongo/db/s/migration_source_manager.cpp +++ b/src/mongo/db/s/migration_source_manager.cpp @@ -320,12 +320,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(failCommitMigrationCommand)) { commitChunkMigrationResponse = Status( diff --git a/src/mongo/db/s/split_chunk_command.cpp b/src/mongo/db/s/split_chunk_command.cpp index 8f40c2fcf94..f4ceaf19855 100644 --- a/src/mongo/db/s/split_chunk_command.cpp +++ b/src/mongo/db/s/split_chunk_command.cpp @@ -354,12 +354,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 |