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

Vitaliy Filippov 2021-03-06 02:53:19 +03:00
parent 30d1ccd43e
commit ab21a1908b
1 changed files with 3 additions and 1 deletions

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);
}