Delete pipeline when query is finished.

This commit is contained in:
Nikolai Kochetov 2019-05-13 20:02:54 +03:00
parent 9f943b739f
commit 4453327344

View File

@ -510,8 +510,11 @@ void TCPHandler::processOrdinaryQueryWithProcessors(size_t num_threads)
}
});
/// Wait in case of exception.
SCOPE_EXIT(pool.wait());
/// Wait in case of exception. Delete pipeline to release memory.
SCOPE_EXIT(
pool.wait();
pipeline = QueryPipeline()
);
while (true)
{