summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/migration_destination_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/migration_destination_manager.cpp')
-rw-r--r--src/mongo/db/s/migration_destination_manager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp
index 415a0fb1042..f74337c7b8e 100644
--- a/src/mongo/db/s/migration_destination_manager.cpp
+++ b/src/mongo/db/s/migration_destination_manager.cpp
@@ -786,7 +786,9 @@ MigrationDestinationManager::IndexesAndIdIndex MigrationDestinationManager::getC
auto cmd = nssOrUUID.nss() ? BSON("listIndexes" << nssOrUUID.nss()->coll())
: BSON("listIndexes" << *nssOrUUID.uuid());
if (cm) {
- cmd = appendShardVersion(cmd, cm->getVersion(fromShardId));
+ ChunkVersion placementVersion = cm->getVersion(fromShardId);
+ cmd = appendShardVersion(
+ cmd, ShardVersion(placementVersion, CollectionIndexes(placementVersion, boost::none)));
}
if (afterClusterTime) {
cmd = cmd.addFields(makeLocalReadConcernWithAfterClusterTime(*afterClusterTime));