Make fsync batch members actually wait for fsync completion (found by kimi k2.6)
This commit is contained in:
@@ -1349,7 +1349,7 @@ bool journal_flusher_co::fsync_batch(bool fsync_meta, int wait_base)
|
|||||||
cur_sync->ready_count++;
|
cur_sync->ready_count++;
|
||||||
flusher->syncing_flushers++;
|
flusher->syncing_flushers++;
|
||||||
resume_1:
|
resume_1:
|
||||||
if (!cur_sync->state)
|
if (cur_sync->state == 0)
|
||||||
{
|
{
|
||||||
if (flusher->syncing_flushers >= flusher->active_flushers || !flusher->flush_queue.size())
|
if (flusher->syncing_flushers >= flusher->active_flushers || !flusher->flush_queue.size())
|
||||||
{
|
{
|
||||||
@@ -1377,6 +1377,12 @@ bool journal_flusher_co::fsync_batch(bool fsync_meta, int wait_base)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (cur_sync->state == 1)
|
||||||
|
{
|
||||||
|
// Wait for fsync completion
|
||||||
|
wait_state = wait_base+1;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
flusher->syncing_flushers--;
|
flusher->syncing_flushers--;
|
||||||
cur_sync->ready_count--;
|
cur_sync->ready_count--;
|
||||||
if (cur_sync->ready_count == 0)
|
if (cur_sync->ready_count == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user