summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Fuschetto <antonio.fuschetto@mongodb.com>2023-02-13 18:49:12 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-02-14 01:46:04 +0000
commit26f1b9d0e4aea57e5c7b47fa56ace80ad629d405 (patch)
tree425d451c015cd86aba140267f1ee8158a8abfdc3
parentca5022f49745ee253f3d120a97d83902864b109e (diff)
downloadmongo-26f1b9d0e4aea57e5c7b47fa56ace80ad629d405.tar.gz
SERVER-73812 Do not automatically retry the `_shardsvrCloneCatalogData` command
-rw-r--r--jstests/concurrency/fsm_workloads/move_primary_with_crud.js7
-rw-r--r--src/mongo/db/s/move_primary_coordinator.cpp11
2 files changed, 6 insertions, 12 deletions
diff --git a/jstests/concurrency/fsm_workloads/move_primary_with_crud.js b/jstests/concurrency/fsm_workloads/move_primary_with_crud.js
index 7fc503ac2fa..ce32e40c362 100644
--- a/jstests/concurrency/fsm_workloads/move_primary_with_crud.js
+++ b/jstests/concurrency/fsm_workloads/move_primary_with_crud.js
@@ -165,12 +165,7 @@ const $config = (function() {
// Due to a stepdown of the donor during the cloning phase, the movePrimary
// operation failed. It is not automatically recovered, but any orphaned data on
// the recipient has been deleted.
- 7120202,
- // Due to a stepdown of the recipient during the cloning phase, the
- // _shardsvrCloneCatalogData command is retried by the donor, finding orphaned
- // documents. The movePrimary operation fails and is not automatically
- // recovered, but orphaned data on the recipient has been deleted.
- ErrorCodes.NamespaceExists
+ 7120202
]);
},
verifyDocuments: function(db, collName, connCache) {
diff --git a/src/mongo/db/s/move_primary_coordinator.cpp b/src/mongo/db/s/move_primary_coordinator.cpp
index e6fb1b958ae..04afaf3d810 100644
--- a/src/mongo/db/s/move_primary_coordinator.cpp
+++ b/src/mongo/db/s/move_primary_coordinator.cpp
@@ -375,12 +375,11 @@ StatusWith<Shard::CommandResponse> MovePrimaryCoordinator::cloneDataToRecipient(
return CommandHelpers::appendMajorityWriteConcern(commandBuilder.obj());
}();
- return toShard->runCommandWithFixedRetryAttempts(
- opCtx,
- ReadPreferenceSetting(ReadPreference::PrimaryOnly),
- NamespaceString::kAdminDb.toString(),
- cloneCommand,
- Shard::RetryPolicy::kNotIdempotent);
+ return toShard->runCommand(opCtx,
+ ReadPreferenceSetting(ReadPreference::PrimaryOnly),
+ NamespaceString::kAdminDb.toString(),
+ cloneCommand,
+ Shard::RetryPolicy::kNoRetry);
}
bool MovePrimaryCoordinator::checkClonedData(Shard::CommandResponse cloneResponse) const {