diff options
author | Benety Goh <benety@mongodb.com> | 2023-05-04 22:36:57 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-05 03:51:13 +0000 |
commit | 86479c0772209865d1b44b4d45f269ec7efe60f2 (patch) | |
tree | 8ce3ff718aedb402e2828994a9474749704e5c78 /src | |
parent | 0e5a6bc0d02a226903a507d465562b5950c33972 (diff) | |
download | mongo-86479c0772209865d1b44b4d45f269ec7efe60f2.tar.gz |
SERVER-76639 remove OpObserver::onRenameCollection() overload
Diffstat (limited to 'src')
30 files changed, 130 insertions, 116 deletions
diff --git a/src/mongo/db/auth/auth_op_observer.cpp b/src/mongo/db/auth/auth_op_observer.cpp index 2d5ffacee66..35a98912cac 100644 --- a/src/mongo/db/auth/auth_op_observer.cpp +++ b/src/mongo/db/auth/auth_op_observer.cpp @@ -192,7 +192,8 @@ void AuthOpObserver::onRenameCollection(OperationContext* const opCtx, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) { + bool stayTemp, + bool markFromMigrate) { postRenameCollection(opCtx, fromCollection, toCollection, uuid, dropTargetUUID, stayTemp); } diff --git a/src/mongo/db/auth/auth_op_observer.h b/src/mongo/db/auth/auth_op_observer.h index c2307f642d4..639336546a5 100644 --- a/src/mongo/db/auth/auth_op_observer.h +++ b/src/mongo/db/auth/auth_op_observer.h @@ -165,14 +165,14 @@ public: const std::string& indexName, const BSONObj& indexInfo) final; - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) final; + bool stayTemp, + bool markFromMigrate) final; void onImportCollection(OperationContext* opCtx, const UUID& importUUID, diff --git a/src/mongo/db/catalog/create_collection.cpp b/src/mongo/db/catalog/create_collection.cpp index 3334781586e..936786b1e75 100644 --- a/src/mongo/db/catalog/create_collection.cpp +++ b/src/mongo/db/catalog/create_collection.cpp @@ -847,7 +847,8 @@ Status createCollectionForApplyOps(OperationContext* opCtx, uuid, /*dropTargetUUID*/ {}, /*numRecords*/ 0U, - stayTemp); + stayTemp, + /*markFromMigrate=*/false); wuow.commit(); // Re-fetch collection after commit to get a valid pointer @@ -896,7 +897,8 @@ Status createCollectionForApplyOps(OperationContext* opCtx, uuid, /*dropTargetUUID*/ {}, /*numRecords*/ 0U, - stayTemp); + stayTemp, + /*markFromMigrate=*/false); wuow.commit(); return Status::OK(); diff --git a/src/mongo/db/catalog/rename_collection_test.cpp b/src/mongo/db/catalog/rename_collection_test.cpp index 5cb0e2c139f..4f463b4edce 100644 --- a/src/mongo/db/catalog/rename_collection_test.cpp +++ b/src/mongo/db/catalog/rename_collection_test.cpp @@ -123,14 +123,14 @@ public: CollectionDropType dropType, bool markFromMigrate) override; - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) override; + bool stayTemp, + bool markFromMigrate) override; using OpObserver::preRenameCollection; repl::OpTime preRenameCollection(OperationContext* opCtx, @@ -263,11 +263,18 @@ void OpObserverMock::onRenameCollection(OperationContext* opCtx, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) { + bool stayTemp, + bool markFromMigrate) { preRenameCollection( opCtx, fromCollection, toCollection, uuid, dropTargetUUID, numRecords, stayTemp); - OpObserverNoop::onRenameCollection( - opCtx, fromCollection, toCollection, uuid, dropTargetUUID, numRecords, stayTemp); + OpObserverNoop::onRenameCollection(opCtx, + fromCollection, + toCollection, + uuid, + dropTargetUUID, + numRecords, + stayTemp, + markFromMigrate); onRenameCollectionCalled = true; onRenameCollectionDropTarget = dropTargetUUID; } diff --git a/src/mongo/db/free_mon/free_mon_op_observer.h b/src/mongo/db/free_mon/free_mon_op_observer.h index 3d8558030f7..ef0002e8430 100644 --- a/src/mongo/db/free_mon/free_mon_op_observer.h +++ b/src/mongo/db/free_mon/free_mon_op_observer.h @@ -165,14 +165,14 @@ public: const std::string& indexName, const BSONObj& indexInfo) final {} - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) final {} + bool stayTemp, + bool markFromMigrate) final {} void onImportCollection(OperationContext* opCtx, const UUID& importUUID, diff --git a/src/mongo/db/op_observer/fcv_op_observer.h b/src/mongo/db/op_observer/fcv_op_observer.h index 52c3eaf8feb..354d92503f6 100644 --- a/src/mongo/db/op_observer/fcv_op_observer.h +++ b/src/mongo/db/op_observer/fcv_op_observer.h @@ -164,14 +164,14 @@ public: const UUID& uuid, const std::string& indexName, const BSONObj& idxDescriptor) final {} - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) final {} + bool stayTemp, + bool markFromMigrate) final {} void onImportCollection(OperationContext* opCtx, const UUID& importUUID, const NamespaceString& nss, diff --git a/src/mongo/db/op_observer/op_observer.h b/src/mongo/db/op_observer/op_observer.h index c9a82a60261..f277241f864 100644 --- a/src/mongo/db/op_observer/op_observer.h +++ b/src/mongo/db/op_observer/op_observer.h @@ -402,18 +402,8 @@ public: const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) = 0; - virtual void onRenameCollection(OperationContext* opCtx, - const NamespaceString& fromCollection, - const NamespaceString& toCollection, - const UUID& uuid, - const boost::optional<UUID>& dropTargetUUID, - std::uint64_t numRecords, bool stayTemp, - bool markFromMigrate) { - onRenameCollection( - opCtx, fromCollection, toCollection, uuid, dropTargetUUID, numRecords, stayTemp); - } + bool markFromMigrate) = 0; virtual void onImportCollection(OperationContext* opCtx, const UUID& importUUID, diff --git a/src/mongo/db/op_observer/op_observer_impl.cpp b/src/mongo/db/op_observer/op_observer_impl.cpp index e7d71516046..f331433081c 100644 --- a/src/mongo/db/op_observer/op_observer_impl.cpp +++ b/src/mongo/db/op_observer/op_observer_impl.cpp @@ -1490,23 +1490,6 @@ void OpObserverImpl::onRenameCollection(OperationContext* const opCtx, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) { - onRenameCollection(opCtx, - fromCollection, - toCollection, - uuid, - dropTargetUUID, - numRecords, - stayTemp, - false /* markFromMigrate */); -} - -void OpObserverImpl::onRenameCollection(OperationContext* const opCtx, - const NamespaceString& fromCollection, - const NamespaceString& toCollection, - const UUID& uuid, - const boost::optional<UUID>& dropTargetUUID, - std::uint64_t numRecords, bool stayTemp, bool markFromMigrate) { preRenameCollection(opCtx, diff --git a/src/mongo/db/op_observer/op_observer_impl.h b/src/mongo/db/op_observer/op_observer_impl.h index bb63ae660f6..461f88d3b73 100644 --- a/src/mongo/db/op_observer/op_observer_impl.h +++ b/src/mongo/db/op_observer/op_observer_impl.h @@ -189,13 +189,6 @@ public: const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) final; - void onRenameCollection(OperationContext* opCtx, - const NamespaceString& fromCollection, - const NamespaceString& toCollection, - const UUID& uuid, - const boost::optional<UUID>& dropTargetUUID, - std::uint64_t numRecords, bool stayTemp, bool markFromMigrate) final; void onImportCollection(OperationContext* opCtx, diff --git a/src/mongo/db/op_observer/op_observer_impl_test.cpp b/src/mongo/db/op_observer/op_observer_impl_test.cpp index 25f95cbe71f..17fb2ddc2a5 100644 --- a/src/mongo/db/op_observer/op_observer_impl_test.cpp +++ b/src/mongo/db/op_observer/op_observer_impl_test.cpp @@ -678,8 +678,14 @@ TEST_F(OpObserverTest, OnRenameCollectionReturnsRenameOpTime) { { AutoGetDb autoDb(opCtx.get(), sourceNss.dbName(), MODE_X); WriteUnitOfWork wunit(opCtx.get()); - opObserver.onRenameCollection( - opCtx.get(), sourceNss, targetNss, uuid, dropTargetUuid, 0U, stayTemp); + opObserver.onRenameCollection(opCtx.get(), + sourceNss, + targetNss, + uuid, + dropTargetUuid, + 0U, + stayTemp, + /*markFromMigrate=*/false); renameOpTime = OpObserver::Times::get(opCtx.get()).reservedOpTimes.front(); wunit.commit(); } @@ -715,8 +721,14 @@ TEST_F(OpObserverTest, OnRenameCollectionIncludesTenantIdFeatureFlagOff) { { AutoGetDb autoDb(opCtx.get(), sourceNss.dbName(), MODE_X); WriteUnitOfWork wunit(opCtx.get()); - opObserver.onRenameCollection( - opCtx.get(), sourceNss, targetNss, uuid, dropTargetUuid, 0U, stayTemp); + opObserver.onRenameCollection(opCtx.get(), + sourceNss, + targetNss, + uuid, + dropTargetUuid, + 0U, + stayTemp, + /*markFromMigrate=*/false); wunit.commit(); } @@ -752,8 +764,14 @@ TEST_F(OpObserverTest, OnRenameCollectionIncludesTenantIdFeatureFlagOn) { { AutoGetDb autoDb(opCtx.get(), sourceNss.dbName(), MODE_X); WriteUnitOfWork wunit(opCtx.get()); - opObserver.onRenameCollection( - opCtx.get(), sourceNss, targetNss, uuid, dropTargetUuid, 0U, stayTemp); + opObserver.onRenameCollection(opCtx.get(), + sourceNss, + targetNss, + uuid, + dropTargetUuid, + 0U, + stayTemp, + /*markFromMigrate=*/false); wunit.commit(); } @@ -786,7 +804,8 @@ TEST_F(OpObserverTest, OnRenameCollectionOmitsDropTargetFieldIfDropTargetUuidIsN { AutoGetDb autoDb(opCtx.get(), sourceNss.dbName(), MODE_X); WriteUnitOfWork wunit(opCtx.get()); - opObserver.onRenameCollection(opCtx.get(), sourceNss, targetNss, uuid, {}, 0U, stayTemp); + opObserver.onRenameCollection( + opCtx.get(), sourceNss, targetNss, uuid, {}, 0U, stayTemp, /*markFromMigrate=*/false); wunit.commit(); } diff --git a/src/mongo/db/op_observer/op_observer_noop.h b/src/mongo/db/op_observer/op_observer_noop.h index 2e373a438ab..31bf48d61d2 100644 --- a/src/mongo/db/op_observer/op_observer_noop.h +++ b/src/mongo/db/op_observer/op_observer_noop.h @@ -147,14 +147,14 @@ public: const UUID& uuid, const std::string& indexName, const BSONObj& idxDescriptor) override {} - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) override {} + bool stayTemp, + bool markFromMigrate) override {} void onImportCollection(OperationContext* opCtx, const UUID& importUUID, const NamespaceString& nss, diff --git a/src/mongo/db/op_observer/op_observer_registry.h b/src/mongo/db/op_observer/op_observer_registry.h index c91513cffdc..d59537743be 100644 --- a/src/mongo/db/op_observer/op_observer_registry.h +++ b/src/mongo/db/op_observer/op_observer_registry.h @@ -293,23 +293,6 @@ public: const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) override { - onRenameCollection(opCtx, - fromCollection, - toCollection, - uuid, - dropTargetUUID, - numRecords, - stayTemp, - false /* markFromMigrate */); - } - - void onRenameCollection(OperationContext* const opCtx, - const NamespaceString& fromCollection, - const NamespaceString& toCollection, - const UUID& uuid, - const boost::optional<UUID>& dropTargetUUID, - std::uint64_t numRecords, bool stayTemp, bool markFromMigrate) override { ReservedTimes times{opCtx}; diff --git a/src/mongo/db/op_observer/op_observer_registry_test.cpp b/src/mongo/db/op_observer/op_observer_registry_test.cpp index f630eccd5e1..e83c029e304 100644 --- a/src/mongo/db/op_observer/op_observer_registry_test.cpp +++ b/src/mongo/db/op_observer/op_observer_registry_test.cpp @@ -63,14 +63,14 @@ struct TestObserver : public OpObserverNoop { OpObserver::Times::get(opCtx).reservedOpTimes.push_back(opTime); return {}; } - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) { + bool stayTemp, + bool markFromMigrate) { preRenameCollection( opCtx, fromCollection, toCollection, uuid, dropTargetUUID, numRecords, stayTemp); postRenameCollection(opCtx, fromCollection, toCollection, uuid, dropTargetUUID, stayTemp); diff --git a/src/mongo/db/op_observer/user_write_block_mode_op_observer.cpp b/src/mongo/db/op_observer/user_write_block_mode_op_observer.cpp index 68d1616f973..8fc8831c7aa 100644 --- a/src/mongo/db/op_observer/user_write_block_mode_op_observer.cpp +++ b/src/mongo/db/op_observer/user_write_block_mode_op_observer.cpp @@ -266,7 +266,8 @@ void UserWriteBlockModeOpObserver::onRenameCollection(OperationContext* opCtx, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) { + bool stayTemp, + bool markFromMigrate) { _checkWriteAllowed(opCtx, fromCollection); _checkWriteAllowed(opCtx, toCollection); } diff --git a/src/mongo/db/op_observer/user_write_block_mode_op_observer.h b/src/mongo/db/op_observer/user_write_block_mode_op_observer.h index 8f1f2f95724..cd0437c0dc8 100644 --- a/src/mongo/db/op_observer/user_write_block_mode_op_observer.h +++ b/src/mongo/db/op_observer/user_write_block_mode_op_observer.h @@ -138,14 +138,14 @@ public: std::uint64_t numRecords, bool stayTemp) final; - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) final; + bool stayTemp, + bool markFromMigrate) final; void onImportCollection(OperationContext* opCtx, const UUID& importUUID, diff --git a/src/mongo/db/op_observer/user_write_block_mode_op_observer_test.cpp b/src/mongo/db/op_observer/user_write_block_mode_op_observer_test.cpp index e7286476cb8..e57d1397052 100644 --- a/src/mongo/db/op_observer/user_write_block_mode_op_observer_test.cpp +++ b/src/mongo/db/op_observer/user_write_block_mode_op_observer_test.cpp @@ -165,8 +165,22 @@ protected: // For renames, make sure we check both from and to for the given namespace opObserver.preRenameCollection(opCtx, nss, adminNss, uuid, boost::none, 0, false); opObserver.preRenameCollection(opCtx, adminNss, nss, uuid, boost::none, 0, false); - opObserver.onRenameCollection(opCtx, nss, adminNss, uuid, boost::none, 0, false); - opObserver.onRenameCollection(opCtx, adminNss, nss, uuid, boost::none, 0, false); + opObserver.onRenameCollection(opCtx, + nss, + adminNss, + uuid, + boost::none, + 0, + /*stayTemp=*/false, + /*markFromMigrate=*/false); + opObserver.onRenameCollection(opCtx, + adminNss, + nss, + uuid, + boost::none, + 0, + /*stayTemp=*/false, + /*markFromMigrate=*/false); opObserver.onImportCollection(opCtx, uuid, nss, 0, 0, BSONObj(), BSONObj(), false); } catch (...) { // Make it easier to see that this is where we failed. @@ -200,12 +214,24 @@ protected: ASSERT_THROWS( opObserver.preRenameCollection(opCtx, adminNss, nss, uuid, boost::none, 0, false), AssertionException); - ASSERT_THROWS( - opObserver.onRenameCollection(opCtx, nss, adminNss, uuid, boost::none, 0, false), - AssertionException); - ASSERT_THROWS( - opObserver.onRenameCollection(opCtx, adminNss, nss, uuid, boost::none, 0, false), - AssertionException); + ASSERT_THROWS(opObserver.onRenameCollection(opCtx, + nss, + adminNss, + uuid, + boost::none, + 0, + /*stayTemp=*/false, + /*markFromMigrate=*/false), + AssertionException); + ASSERT_THROWS(opObserver.onRenameCollection(opCtx, + adminNss, + nss, + uuid, + boost::none, + 0, + /*stayTemp=*/false, + /*markFromMigrate=*/false), + AssertionException); ASSERT_THROWS( opObserver.onImportCollection(opCtx, uuid, nss, 0, 0, BSONObj(), BSONObj(), false), AssertionException); diff --git a/src/mongo/db/repl/oplog_applier_impl_test_fixture.cpp b/src/mongo/db/repl/oplog_applier_impl_test_fixture.cpp index 9630d21ab19..01fefaef308 100644 --- a/src/mongo/db/repl/oplog_applier_impl_test_fixture.cpp +++ b/src/mongo/db/repl/oplog_applier_impl_test_fixture.cpp @@ -112,12 +112,19 @@ void OplogApplierImplOpObserver::onRenameCollection(OperationContext* opCtx, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) { + bool stayTemp, + bool markFromMigrate) { if (!onRenameCollectionFn) { return; } - onRenameCollectionFn( - opCtx, fromCollection, toCollection, uuid, dropTargetUUID, numRecords, stayTemp); + onRenameCollectionFn(opCtx, + fromCollection, + toCollection, + uuid, + dropTargetUUID, + numRecords, + stayTemp, + markFromMigrate); } void OplogApplierImplOpObserver::onCreateIndex(OperationContext* opCtx, diff --git a/src/mongo/db/repl/oplog_applier_impl_test_fixture.h b/src/mongo/db/repl/oplog_applier_impl_test_fixture.h index fdd36472208..4f513839fd6 100644 --- a/src/mongo/db/repl/oplog_applier_impl_test_fixture.h +++ b/src/mongo/db/repl/oplog_applier_impl_test_fixture.h @@ -112,14 +112,14 @@ public: /** * Called when OplogApplierImpl renames a collection. */ - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) override; + bool stayTemp, + bool markFromMigrate) override; /** * Called when OplogApplierImpl creates an index. @@ -183,6 +183,7 @@ public: boost::optional<UUID>, boost::optional<UUID>, std::uint64_t, + bool, bool)> onRenameCollectionFn; diff --git a/src/mongo/db/repl/primary_only_service_op_observer.h b/src/mongo/db/repl/primary_only_service_op_observer.h index 459f6d018e9..b74102838be 100644 --- a/src/mongo/db/repl/primary_only_service_op_observer.h +++ b/src/mongo/db/repl/primary_only_service_op_observer.h @@ -167,14 +167,14 @@ public: const std::string& indexName, const BSONObj& indexInfo) final {} - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) final {} + bool stayTemp, + bool markFromMigrate) final {} void onImportCollection(OperationContext* opCtx, const UUID& importUUID, diff --git a/src/mongo/db/repl/shard_merge_recipient_op_observer.h b/src/mongo/db/repl/shard_merge_recipient_op_observer.h index 8e3eee25744..e78ff632749 100644 --- a/src/mongo/db/repl/shard_merge_recipient_op_observer.h +++ b/src/mongo/db/repl/shard_merge_recipient_op_observer.h @@ -164,14 +164,14 @@ public: const std::string& indexName, const BSONObj& indexInfo) final {} - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) final {} + bool stayTemp, + bool markFromMigrate) final {} void onImportCollection(OperationContext* opCtx, const UUID& importUUID, diff --git a/src/mongo/db/repl/tenant_migration_donor_op_observer.h b/src/mongo/db/repl/tenant_migration_donor_op_observer.h index c4783207124..1130bc4aded 100644 --- a/src/mongo/db/repl/tenant_migration_donor_op_observer.h +++ b/src/mongo/db/repl/tenant_migration_donor_op_observer.h @@ -165,14 +165,14 @@ public: const std::string& indexName, const BSONObj& indexInfo) final {} - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) final {} + bool stayTemp, + bool markFromMigrate) final {} void onImportCollection(OperationContext* opCtx, const UUID& importUUID, diff --git a/src/mongo/db/repl/tenant_migration_recipient_op_observer.h b/src/mongo/db/repl/tenant_migration_recipient_op_observer.h index a3c443fc5ef..7794fbf9f33 100644 --- a/src/mongo/db/repl/tenant_migration_recipient_op_observer.h +++ b/src/mongo/db/repl/tenant_migration_recipient_op_observer.h @@ -166,14 +166,14 @@ public: const std::string& indexName, const BSONObj& indexInfo) final {} - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) final {} + bool stayTemp, + bool markFromMigrate) final {} void onImportCollection(OperationContext* opCtx, const UUID& importUUID, diff --git a/src/mongo/db/repl/tenant_oplog_applier_test.cpp b/src/mongo/db/repl/tenant_oplog_applier_test.cpp index 166d9ccdcd5..3deee8a6694 100644 --- a/src/mongo/db/repl/tenant_oplog_applier_test.cpp +++ b/src/mongo/db/repl/tenant_oplog_applier_test.cpp @@ -976,7 +976,8 @@ TEST_F(TenantOplogApplierTest, ApplyRenameCollCommand_CollExisting) { const boost::optional<UUID>& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) { + bool stayTemp, + bool markFromMigrate) { applyCmdCalled = true; }; auto entry = OplogEntry(op); diff --git a/src/mongo/db/s/config_server_op_observer.h b/src/mongo/db/s/config_server_op_observer.h index b60d3733b83..ccb64f36346 100644 --- a/src/mongo/db/s/config_server_op_observer.h +++ b/src/mongo/db/s/config_server_op_observer.h @@ -168,14 +168,14 @@ public: const std::string& indexName, const BSONObj& indexInfo) override {} - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) override {} + bool stayTemp, + bool markFromMigrate) override {} void onImportCollection(OperationContext* opCtx, const UUID& importUUID, const NamespaceString& nss, diff --git a/src/mongo/db/s/query_analysis_op_observer.h b/src/mongo/db/s/query_analysis_op_observer.h index 18382135bf0..4acf6bfe1b0 100644 --- a/src/mongo/db/s/query_analysis_op_observer.h +++ b/src/mongo/db/s/query_analysis_op_observer.h @@ -167,14 +167,14 @@ public: const std::string& indexName, const BSONObj& indexInfo) final {} - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) final {} + bool stayTemp, + bool markFromMigrate) final {} void onImportCollection(OperationContext* opCtx, const UUID& importUUID, diff --git a/src/mongo/db/s/range_deleter_service_op_observer.h b/src/mongo/db/s/range_deleter_service_op_observer.h index 4331bc6f86b..9a3b79f98dd 100644 --- a/src/mongo/db/s/range_deleter_service_op_observer.h +++ b/src/mongo/db/s/range_deleter_service_op_observer.h @@ -170,14 +170,14 @@ private: const std::string& indexName, const BSONObj& indexInfo) override {} - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) override {} + bool stayTemp, + bool markFromMigrate) override {} virtual void onImportCollection(OperationContext* opCtx, const UUID& importUUID, diff --git a/src/mongo/db/s/resharding/resharding_op_observer.h b/src/mongo/db/s/resharding/resharding_op_observer.h index 037dab2eff3..8d54391a361 100644 --- a/src/mongo/db/s/resharding/resharding_op_observer.h +++ b/src/mongo/db/s/resharding/resharding_op_observer.h @@ -185,14 +185,14 @@ public: const std::string& indexName, const BSONObj& indexInfo) override {} - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) override {} + bool stayTemp, + bool markFromMigrate) override {} void onImportCollection(OperationContext* opCtx, const UUID& importUUID, diff --git a/src/mongo/db/s/shard_server_op_observer.h b/src/mongo/db/s/shard_server_op_observer.h index 4b1d9985530..9ec41a46d25 100644 --- a/src/mongo/db/s/shard_server_op_observer.h +++ b/src/mongo/db/s/shard_server_op_observer.h @@ -165,14 +165,14 @@ public: const std::string& indexName, const BSONObj& indexInfo) override; - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) override {} + bool stayTemp, + bool markFromMigrate) override {} virtual void onImportCollection(OperationContext* opCtx, const UUID& importUUID, diff --git a/src/mongo/db/serverless/shard_split_donor_op_observer.h b/src/mongo/db/serverless/shard_split_donor_op_observer.h index c9bed218045..cd94b8b0e3f 100644 --- a/src/mongo/db/serverless/shard_split_donor_op_observer.h +++ b/src/mongo/db/serverless/shard_split_donor_op_observer.h @@ -164,14 +164,14 @@ public: const std::string& indexName, const BSONObj& indexInfo) final {} - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) final {} + bool stayTemp, + bool markFromMigrate) final {} void onImportCollection(OperationContext* opCtx, const UUID& importUUID, diff --git a/src/mongo/idl/cluster_server_parameter_op_observer.h b/src/mongo/idl/cluster_server_parameter_op_observer.h index 61c5851792d..1c89c0dd738 100644 --- a/src/mongo/idl/cluster_server_parameter_op_observer.h +++ b/src/mongo/idl/cluster_server_parameter_op_observer.h @@ -191,14 +191,14 @@ public: return repl::OpTime(); } - using OpObserver::onRenameCollection; void onRenameCollection(OperationContext* opCtx, const NamespaceString& fromCollection, const NamespaceString& toCollection, const UUID& uuid, const boost::optional<UUID>& dropTargetUUID, std::uint64_t numRecords, - bool stayTemp) final {} + bool stayTemp, + bool markFromMigrate) final {} void onApplyOps(OperationContext* opCtx, const DatabaseName& dbName, |