From 80274857de4e999bec046312f53280032345a45f Mon Sep 17 00:00:00 2001 From: Christopher Caplinger Date: Fri, 21 Jan 2022 15:43:16 +0000 Subject: SERVER-61132: Keep backup cursor alive until file copy finishes --- src/mongo/db/repl/tenant_migration_recipient_service.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/repl/tenant_migration_recipient_service.h') diff --git a/src/mongo/db/repl/tenant_migration_recipient_service.h b/src/mongo/db/repl/tenant_migration_recipient_service.h index 92da0a80199..5c7f26e8d4b 100644 --- a/src/mongo/db/repl/tenant_migration_recipient_service.h +++ b/src/mongo/db/repl/tenant_migration_recipient_service.h @@ -366,7 +366,7 @@ public: /** * Kills the Donor backup cursor */ - void _killBackupCursor(WithLock lk); + ExecutorFuture _killBackupCursor(); /** * Retrieves the start optimes from the donor and updates the in-memory state accordingly. @@ -568,9 +568,11 @@ public: std::unique_ptr _client; // (S) std::unique_ptr _oplogFetcherClient; // (S) - CursorId _donorFilenameBackupCursorId = 0; // (M) + CursorId _donorFilenameBackupCursorId; // (M) NamespaceString _donorFilenameBackupCursorNamespaceString; // (M) std::unique_ptr _donorFilenameBackupCursorFileFetcher; // (M) + CancellationSource _backupCursorKeepAliveCancellation = {}; // (X) + boost::optional> _backupCursorKeepAliveFuture; // (M) std::unique_ptr _createOplogFetcherFn = std::make_unique(); // (M) -- cgit v1.2.1