summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/tenant_collection_cloner.cpp
diff options
context:
space:
mode:
authorSuganthi Mani <suganthi.mani@mongodb.com>2022-04-26 12:03:36 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-26 12:36:10 +0000
commit61087a02978226541e7f17f51a8755b680e26364 (patch)
tree7c3713b2c5a0b8517c1858695650f084e55d4967 /src/mongo/db/repl/tenant_collection_cloner.cpp
parent35f03b7ef5739264c9de4b9a6d3e38bdc19b5c17 (diff)
downloadmongo-61087a02978226541e7f17f51a8755b680e26364.tar.gz
SERVER-65300 Refactor tenant migration recipient state machinery code.
Diffstat (limited to 'src/mongo/db/repl/tenant_collection_cloner.cpp')
-rw-r--r--src/mongo/db/repl/tenant_collection_cloner.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/repl/tenant_collection_cloner.cpp b/src/mongo/db/repl/tenant_collection_cloner.cpp
index d74b0760cd4..cd6ea25a650 100644
--- a/src/mongo/db/repl/tenant_collection_cloner.cpp
+++ b/src/mongo/db/repl/tenant_collection_cloner.cpp
@@ -324,7 +324,7 @@ BaseCloner::AfterStageBehavior TenantCollectionCloner::createCollectionStage() {
uassert(ErrorCodes::NamespaceExists,
str::stream() << "Tenant '" << _tenantId << "': collection '" << collection->ns()
<< "' already exists prior to data sync",
- getSharedData()->isResuming());
+ getSharedData()->getResumePhase() == ResumePhase::kDataSync);
_existingNss = collection->ns();
LOGV2(5342502,
@@ -393,7 +393,8 @@ BaseCloner::AfterStageBehavior TenantCollectionCloner::createCollectionStage() {
_collectionOptions,
!_idIndexSpec.isEmpty() /* createIdIndex */,
_idIndexSpec);
- if (status == ErrorCodes::NamespaceExists && getSharedData()->isResuming()) {
+ if (status == ErrorCodes::NamespaceExists &&
+ getSharedData()->getResumePhase() == ResumePhase::kDataSync) {
// If we are resuming from a recipient failover we can get ErrorCodes::NamespaceExists
// due to following conditions:
//