summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergi Mateo Bellido <sergi.mateo-bellido@mongodb.com>2021-11-05 14:42:19 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-05 15:18:48 +0000
commit9ad49bff85da84d36f2438ec3d8bae0a8af0e19e (patch)
treef6c0f4a0a2bfc2639b46ca1b4b0b157cc456bd14
parent406e8f1bebdc7e506b1dfcf013c528de53807e78 (diff)
downloadmongo-9ad49bff85da84d36f2438ec3d8bae0a8af0e19e.tar.gz
SERVER-60805 Rename the ShardId field on the recipient doc
-rw-r--r--src/mongo/db/s/migration_recipient_recovery_document.idl6
-rw-r--r--src/mongo/db/s/migration_util.cpp2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/db/s/migration_recipient_recovery_document.idl b/src/mongo/db/s/migration_recipient_recovery_document.idl
index 9dde3c9d2fc..6a4a000c947 100644
--- a/src/mongo/db/s/migration_recipient_recovery_document.idl
+++ b/src/mongo/db/s/migration_recipient_recovery_document.idl
@@ -52,9 +52,11 @@ structs:
range:
type: chunk_range
description: "The range being migrated."
- donorShardId:
+ donorShardIdForLoggingPurposesOnly:
type: shard_id
- description: "The shard from which the chunk is being migrated."
+ description: "The shard from which the chunk is being migrated. This field should
+ only be used for logging purposes and it is not properly updated
+ during the automated restores procedure."
lsid:
type: LogicalSessionId
description: "The sessionId that the donor uses to communicate with the recipient."
diff --git a/src/mongo/db/s/migration_util.cpp b/src/mongo/db/s/migration_util.cpp
index 7eb5fccf95d..9a7c686a5a3 100644
--- a/src/mongo/db/s/migration_util.cpp
+++ b/src/mongo/db/s/migration_util.cpp
@@ -1161,7 +1161,7 @@ void resumeMigrationRecipientsOnStepUp(OperationContext* opCtx) {
// to prevent a new migration from starting while a receiveChunk was ongoing.
auto scopedReceiveChunk(
uassertStatusOK(ActiveMigrationsRegistry::get(opCtx).registerReceiveChunk(
- opCtx, nss, doc.getRange(), doc.getDonorShardId())));
+ opCtx, nss, doc.getRange(), doc.getDonorShardIdForLoggingPurposesOnly())));
const auto mdm = MigrationDestinationManager::get(opCtx);
uassertStatusOK(