Skip to content

Commit 7b99d9a

Browse files
committed
wait for currently running jobs to finish #2
1 parent a1de16d commit 7b99d9a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

programs/server/Server.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1746,7 +1746,10 @@ try
17461746
// to avoid simultaneously running table startups and destructing databases.
17471747
SCOPE_EXIT_SAFE(
17481748
LOG_INFO(log, "Stopping AsyncLoader.");
1749-
global_context->getAsyncLoader().stopAndDoNotWait(); // Note that currently running jobs will proceed
1749+
1750+
// Waits for all currently running jobs to finish and do not run any other pending jobs.
1751+
// Pending jobs will be canceled and destructed later by `load_metadata_tasks` dtor.
1752+
global_context->getAsyncLoader().stop();
17501753
);
17511754

17521755
try

0 commit comments

Comments
 (0)