diff options
author | Christopher Caplinger <christopher.caplinger@mongodb.com> | 2022-08-04 17:08:55 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-04 18:36:19 +0000 |
commit | aef31ad1a0d47dcd3851161a269d5cc76f83f819 (patch) | |
tree | f1373aeb057ea9f4bad30de051ab351691888204 /src/mongo/db/repl/tenant_collection_cloner.cpp | |
parent | 2bddb8f08fbeb742f30e0489115f0c5eb5a4b97a (diff) | |
download | mongo-aef31ad1a0d47dcd3851161a269d5cc76f83f819.tar.gz |
SERVER-64616: Install recipient access blocker when applying "create" entry
Diffstat (limited to 'src/mongo/db/repl/tenant_collection_cloner.cpp')
-rw-r--r-- | src/mongo/db/repl/tenant_collection_cloner.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/repl/tenant_collection_cloner.cpp b/src/mongo/db/repl/tenant_collection_cloner.cpp index 165538954bd..ab3b0508510 100644 --- a/src/mongo/db/repl/tenant_collection_cloner.cpp +++ b/src/mongo/db/repl/tenant_collection_cloner.cpp @@ -341,11 +341,11 @@ BaseCloner::AfterStageBehavior TenantCollectionCloner::createCollectionStage() { DBDirectClient client(opCtx.get()); // Set the recipient info on the opCtx to bypass the access blocker for local reads. - tenantMigrationRecipientInfo(opCtx.get()) = - boost::make_optional<TenantMigrationRecipientInfo>(getSharedData()->getMigrationId()); + tenantMigrationInfo(opCtx.get()) = + boost::make_optional<TenantMigrationInfo>(getSharedData()->getMigrationId()); // Reset the recipient info after local reads so oplog entries for future writes // (createCollection/createIndex) don't get stamped with the fromTenantMigration field. - ON_BLOCK_EXIT([&opCtx] { tenantMigrationRecipientInfo(opCtx.get()) = boost::none; }); + ON_BLOCK_EXIT([&opCtx] { tenantMigrationInfo(opCtx.get()) = boost::none; }); FindCommandRequest findCmd{*_existingNss}; findCmd.setSort(BSON("_id" << -1)); @@ -585,8 +585,8 @@ void TenantCollectionCloner::insertDocumentsCallback( // Set the recipient info on the opCtx to skip checking user permissions in // 'write_ops_exec::performInserts()'. - tenantMigrationRecipientInfo(cbd.opCtx) = - boost::make_optional<TenantMigrationRecipientInfo>(getSharedData()->getMigrationId()); + tenantMigrationInfo(cbd.opCtx) = + boost::make_optional<TenantMigrationInfo>(getSharedData()->getMigrationId()); // write_ops_exec::PerformInserts() will handle limiting the batch size // that gets inserted in a single WUOW. |