diff options
author | Allison Easton <allison.easton@mongodb.com> | 2022-03-22 10:59:45 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-22 11:50:09 +0000 |
commit | 2e63d56d8feea365eeee5e1458ed3873a80ce71c (patch) | |
tree | 18f825db1613ff1d34c64be05005d83832f3d8fb /src/mongo/db/s/migration_destination_manager.cpp | |
parent | 2969036ee519f907a741491fca05abdf0491b198 (diff) | |
download | mongo-2e63d56d8feea365eeee5e1458ed3873a80ce71c.tar.gz |
SERVER-64163 Synchronize orphans tracking upon upgrade/downgrade with ongoing migrations
Diffstat (limited to 'src/mongo/db/s/migration_destination_manager.cpp')
-rw-r--r-- | src/mongo/db/s/migration_destination_manager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp index f1cb2c28c9f..eea3d480764 100644 --- a/src/mongo/db/s/migration_destination_manager.cpp +++ b/src/mongo/db/s/migration_destination_manager.cpp @@ -79,6 +79,7 @@ #include "mongo/s/grid.h" #include "mongo/s/pm2423_feature_flags_gen.h" #include "mongo/s/shard_key_pattern.h" +#include "mongo/s/sharding_feature_flags_gen.h" #include "mongo/stdx/chrono.h" #include "mongo/util/fail_point.h" #include "mongo/util/producer_consumer_queue.h" @@ -1227,6 +1228,9 @@ void MigrationDestinationManager::_migrateDriver(OperationContext* outerOpCtx, recipientDeletionTask.setPending(true); const auto currentTime = VectorClock::get(outerOpCtx)->getTime(); recipientDeletionTask.setTimestamp(currentTime.clusterTime().asTimestamp()); + if (feature_flags::gOrphanTracking.isEnabled(serverGlobalParams.featureCompatibility)) { + recipientDeletionTask.setNumOrphanDocs(0); + } // It is illegal to wait for write concern with a session checked out, so persist the // range deletion task with an immediately satsifiable write concern and then wait for |