Fix possible infinite loop in flusher (surprisingly reproduced in test_write.sh with iothreads)

This commit is contained in:
Vitaliy Filippov
2024-06-27 00:38:01 +03:00
parent ea0d72289c
commit ca63cd507d
+1 -1
View File
@@ -366,6 +366,7 @@ resume_0:
!flusher->flush_queue.size() || !flusher->dequeuing)
{
stop_flusher:
flusher->dequeuing = false;
if (flusher->trim_wanted > 0 && try_trim)
{
// Attempt forced trim
@@ -373,7 +374,6 @@ stop_flusher:
flusher->active_flushers++;
goto trim_journal;
}
flusher->dequeuing = false;
wait_state = 0;
return true;
}