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) !flusher->flush_queue.size() || !flusher->dequeuing)
{ {
stop_flusher: stop_flusher:
flusher->dequeuing = false;
if (flusher->trim_wanted > 0 && try_trim) if (flusher->trim_wanted > 0 && try_trim)
{ {
// Attempt forced trim // Attempt forced trim
@@ -373,7 +374,6 @@ stop_flusher:
flusher->active_flushers++; flusher->active_flushers++;
goto trim_journal; goto trim_journal;
} }
flusher->dequeuing = false;
wait_state = 0; wait_state = 0;
return true; return true;
} }