diff --git a/src/Interpreters/Context.cpp b/src/Interpreters/Context.cpp index f8f9b71abd9..d32d1e97183 100644 --- a/src/Interpreters/Context.cpp +++ b/src/Interpreters/Context.cpp @@ -2372,6 +2372,13 @@ void Context::shutdown() } } + if (merge_mutate_executor) + merge_mutate_executor->wait(); + if (fetch_executor) + fetch_executor->wait(); + if (moves_executor) + moves_executor->wait(); + shared->shutdown(); }