diff options
author | Jennifer Peshansky <jennifer.peshansky@mongodb.com> | 2022-11-03 16:13:20 +0000 |
---|---|---|
committer | Jennifer Peshansky <jennifer.peshansky@mongodb.com> | 2022-11-03 16:13:20 +0000 |
commit | e74d2910bbe76790ad131d53fee277829cd95982 (patch) | |
tree | cabe148764529c9623652374fbc36323a550cd44 /src/mongo/db/repl/tenant_migration_recipient_service.h | |
parent | 280145e9940729480bb8a35453d4056afac87641 (diff) | |
parent | ba467f46cc1bc49965e1d72b541eff0cf1d7b22e (diff) | |
download | mongo-jenniferpeshansky/SERVER-70854.tar.gz |
Merge branch 'master' into jenniferpeshansky/SERVER-70854jenniferpeshansky/SERVER-70854
Diffstat (limited to 'src/mongo/db/repl/tenant_migration_recipient_service.h')
-rw-r--r-- | src/mongo/db/repl/tenant_migration_recipient_service.h | 17 |
1 files changed, 17 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 22de9a00fd1..a71f29139d9 100644 --- a/src/mongo/db/repl/tenant_migration_recipient_service.h +++ b/src/mongo/db/repl/tenant_migration_recipient_service.h @@ -213,6 +213,15 @@ public: private: friend class TenantMigrationRecipientServiceTest; + friend class TenantMigrationRecipientServiceShardMergeTest; + + /** + * Only used for testing. Allows setting a custom task executor for backup cursor fetcher. + */ + void setBackupCursorFetcherExecutor_forTest( + std::shared_ptr<executor::TaskExecutor> taskExecutor) { + _backupCursorExecutor = taskExecutor; + } const NamespaceString _stateDocumentsNS = NamespaceString::kTenantMigrationRecipientsNamespace; @@ -605,6 +614,13 @@ public: SemiFuture<TenantOplogApplier::OpTimePair> _migrateUsingShardMergeProtocol( const CancellationToken& token); + /* + * Send the killBackupCursor command to the remote in order to close the backup cursor + * connection on the donor. + */ + StatusWith<executor::TaskExecutor::CallbackHandle> _scheduleKillBackupCursorWithLock( + WithLock lk, std::shared_ptr<executor::TaskExecutor> executor); + mutable Mutex _mutex = MONGO_MAKE_LATCH("TenantMigrationRecipientService::_mutex"); // All member variables are labeled with one of the following codes indicating the @@ -618,6 +634,7 @@ public: ServiceContext* const _serviceContext; const TenantMigrationRecipientService* const _recipientService; // (R) (not owned) std::shared_ptr<executor::ScopedTaskExecutor> _scopedExecutor; // (M) + std::shared_ptr<executor::TaskExecutor> _backupCursorExecutor; // (M) TenantMigrationRecipientDocument _stateDoc; // (M) // This data is provided in the initial state doc and never changes. We keep copies to |