Check for the dirty PG flag when trying to continue to stop it after sync

This commit is contained in:
Vitaliy Filippov
2021-03-08 17:04:10 +03:00
parent 30d1ccd43e
commit ab21a1908b
+3 -1
View File
@@ -656,7 +656,9 @@ resume_6:
{
auto & pg = pgs.at(op_data->dirty_pgs[i]);
pg.inflight--;
if ((pg.state & PG_STOPPING) && pg.inflight == 0 && !pg.flush_batch)
if ((pg.state & PG_STOPPING) && pg.inflight == 0 && !pg.flush_batch &&
// We must either forget all PG's unstable writes or wait for it to become clean
dirty_pgs.find({ .pool_id = pg.pool_id, .pg_num = pg.pg_num }) == dirty_pgs.end())
{
finish_stop_pg(pg);
}