Avoid busy polling in keeper while searching for changelog files to delete

Fixes: #34534
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2022-02-27 18:25:56 +03:00
parent ba9150abb0
commit 54ceadd4b3

View File

@ -732,7 +732,7 @@ void Changelog::cleanLogThread()
while (!log_files_to_delete_queue.isFinishedAndEmpty())
{
std::string path;
if (log_files_to_delete_queue.tryPop(path))
if (log_files_to_delete_queue.pop(path))
{
std::error_code ec;
if (std::filesystem::remove(path, ec))