diff options
author | Andrew Shuvalov <andrew.shuvalov@mongodb.com> | 2021-01-21 17:57:03 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-02-24 22:01:34 +0000 |
commit | 68ecdc716c77aaef860571d77cc65542bbf5d094 (patch) | |
tree | 6876845355c6c0f852b6eda376ef0dae01fbb4f6 /src/mongo/db/repl/tenant_migration_access_blocker_util.h | |
parent | 3b6988a6ab3244ac130e42711c4f5cb979287882 (diff) | |
download | mongo-68ecdc716c77aaef860571d77cc65542bbf5d094.tar.gz |
SERVER-53505: make the tenant migration access blocker use in InvokeCommand more asynchronous
Diffstat (limited to 'src/mongo/db/repl/tenant_migration_access_blocker_util.h')
-rw-r--r-- | src/mongo/db/repl/tenant_migration_access_blocker_util.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/repl/tenant_migration_access_blocker_util.h b/src/mongo/db/repl/tenant_migration_access_blocker_util.h index 33fbab7da64..104fd5a26ac 100644 --- a/src/mongo/db/repl/tenant_migration_access_blocker_util.h +++ b/src/mongo/db/repl/tenant_migration_access_blocker_util.h @@ -51,11 +51,10 @@ TenantMigrationDonorDocument parseDonorStateDocument(const BSONObj& doc); /** * If the operation has read concern "snapshot" or includes afterClusterTime, and the database is * in the read blocking state at the given atClusterTime or afterClusterTime or the selected read - * timestamp, blocks until the migration is committed or aborted. - * TODO SERVER-53505: Change this to return - * SharedSemiFuture<TenantMigrationDonorAccessBlocker::State>. + * timestamp, the promise will be set for the returned future when the migration is committed or + * aborted. Note: for better performance, check if the future is immediately ready. */ -void checkIfCanReadOrBlock(OperationContext* opCtx, StringData dbName); +SemiFuture<void> checkIfCanReadOrBlock(OperationContext* opCtx, StringData dbName); /** * If the operation has read concern "linearizable", throws TenantMigrationCommitted error if the |