diff options
author | Vesselina Ratcheva <vesselina.ratcheva@10gen.com> | 2021-04-30 02:26:16 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-05-12 08:20:51 +0000 |
commit | a0c0b91d6cbe72bf1e12ab8a8b3eddb7ed4d9f7e (patch) | |
tree | 8efce9f3250ba30015913526a3649fb0d52ad053 /src/mongo/db/repl/tenant_migration_recipient_service.h | |
parent | 02d6940401bd6ff2696decc90dd01398f0bd6065 (diff) | |
download | mongo-a0c0b91d6cbe72bf1e12ab8a8b3eddb7ed4d9f7e.tar.gz |
SERVER-53563 Cancel tenant migrations on FCV change (recipient side)
Diffstat (limited to 'src/mongo/db/repl/tenant_migration_recipient_service.h')
-rw-r--r-- | src/mongo/db/repl/tenant_migration_recipient_service.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/repl/tenant_migration_recipient_service.h b/src/mongo/db/repl/tenant_migration_recipient_service.h index 90066bd0d00..62502d29dfe 100644 --- a/src/mongo/db/repl/tenant_migration_recipient_service.h +++ b/src/mongo/db/repl/tenant_migration_recipient_service.h @@ -75,6 +75,11 @@ public: std::shared_ptr<PrimaryOnlyService::Instance> constructInstance(BSONObj initialStateDoc) final; + /** + * Sends an abort to all tenant migration instances on this recipient. + */ + void abortAllMigrations(OperationContext* opCtx); + class Instance final : public PrimaryOnlyService::TypedInstance<Instance> { public: explicit Instance(ServiceContext* const serviceContext, @@ -90,6 +95,11 @@ public: */ void interrupt(Status status) override; + /* + * Cancels the running instance but permits waiting for forgetMigration. + */ + void cancelMigration(); + /** * Interrupts the migration for garbage collection. */ |