summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/start_chunk_clone_request.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/start_chunk_clone_request.cpp')
-rw-r--r--src/mongo/db/s/start_chunk_clone_request.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/mongo/db/s/start_chunk_clone_request.cpp b/src/mongo/db/s/start_chunk_clone_request.cpp
index e81f5754b90..86567dce161 100644
--- a/src/mongo/db/s/start_chunk_clone_request.cpp
+++ b/src/mongo/db/s/start_chunk_clone_request.cpp
@@ -152,12 +152,10 @@ StatusWith<StartChunkCloneRequest> StartChunkCloneRequest::createFromCommand(Nam
}
}
- if (obj.getField("uuid")) {
- request._migrationId = UUID::parse(obj);
- request._lsid = LogicalSessionId::parse(IDLParserErrorContext("StartChunkCloneRequest"),
- obj[kLsid].Obj());
- request._txnNumber = obj.getField(kTxnNumber).Long();
- }
+ request._migrationId = UUID::parse(obj);
+ request._lsid =
+ LogicalSessionId::parse(IDLParserErrorContext("StartChunkCloneRequest"), obj[kLsid].Obj());
+ request._txnNumber = obj.getField(kTxnNumber).Long();
return request;
}
@@ -175,19 +173,16 @@ void StartChunkCloneRequest::appendAsCommand(
const BSONObj& chunkMinKey,
const BSONObj& chunkMaxKey,
const BSONObj& shardKeyPattern,
- const MigrationSecondaryThrottleOptions& secondaryThrottle,
- bool resumableRangeDeleterDisabled) {
+ const MigrationSecondaryThrottleOptions& secondaryThrottle) {
invariant(builder->asTempObj().isEmpty());
invariant(nss.isValid());
invariant(fromShardConnectionString.isValid());
builder->append(kRecvChunkStart, nss.ns());
- if (!resumableRangeDeleterDisabled) {
- migrationId.appendToBuilder(builder, kMigrationId);
- builder->append(kLsid, lsid.toBSON());
- builder->append(kTxnNumber, txnNumber);
- }
+ migrationId.appendToBuilder(builder, kMigrationId);
+ builder->append(kLsid, lsid.toBSON());
+ builder->append(kTxnNumber, txnNumber);
sessionId.append(builder);
builder->append(kFromShardConnectionString, fromShardConnectionString.toString());