diff options
author | mathisbessamdb <mathis.bessa@mongodb.com> | 2022-12-13 21:01:00 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-12-13 21:34:48 +0000 |
commit | 2310a312d7dfdb5934ca2bc2a5277b5f6270a6a5 (patch) | |
tree | dfdf7966f17a4c38fd6d2b8f18b36113bc8acf10 /src/mongo/db/repl/tenant_migration_access_blocker_registry.h | |
parent | 4a5d4e67fc8994c8cb8825c8c50514e632e82801 (diff) | |
download | mongo-2310a312d7dfdb5934ca2bc2a5277b5f6270a6a5.tar.gz |
SERVER-71186 Tenant migration access blocker registry to use TenantId object for Shard Split
Diffstat (limited to 'src/mongo/db/repl/tenant_migration_access_blocker_registry.h')
-rw-r--r-- | src/mongo/db/repl/tenant_migration_access_blocker_registry.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/repl/tenant_migration_access_blocker_registry.h b/src/mongo/db/repl/tenant_migration_access_blocker_registry.h index 982ebb199dc..0bc9ad47536 100644 --- a/src/mongo/db/repl/tenant_migration_access_blocker_registry.h +++ b/src/mongo/db/repl/tenant_migration_access_blocker_registry.h @@ -112,8 +112,10 @@ public: /** * Adds an entry for mtab with the provided tenantId as the key. There must not be * a blocker of the same type (donor or recipient) for this tenantId already. + * TODO (SERVER-72081) Remove this method since we now use TenantId object type for tenantId. */ void add(StringData tenantId, std::shared_ptr<TenantMigrationAccessBlocker> mtab); + void add(const TenantId& tenantId, std::shared_ptr<TenantMigrationAccessBlocker> mtab); /** * Add one access blocker and associate it with many tenant_id objects. @@ -128,8 +130,10 @@ public: /** * Removes the entry for (tenantId, mtab) + * TODO (SERVER-72081) Remove this method since we now use TenantId object type for tenantId. */ void remove(StringData tenantId, TenantMigrationAccessBlocker::BlockerType type); + void remove(const TenantId& tenantId, TenantMigrationAccessBlocker::BlockerType type); /** * Remove all access blockers of the provided type for a migration. @@ -167,10 +171,14 @@ public: /** * Searches through TenantMigrationAccessBlockers and * returns the TenantMigrationAccessBlocker that matches tenantId. + * TODO (SERVER-72081) Remove this method since we now use TenantId object type for tenantId. */ std::shared_ptr<TenantMigrationAccessBlocker> getTenantMigrationAccessBlockerForTenantId( StringData tenantId, TenantMigrationAccessBlocker::BlockerType type); + std::shared_ptr<TenantMigrationAccessBlocker> getTenantMigrationAccessBlockerForTenantId( + const TenantId& tenantId, TenantMigrationAccessBlocker::BlockerType type); + using applyAllCallback = std::function<void( std::string tenantId, std::shared_ptr<TenantMigrationAccessBlocker>& mtab)>; /** |