Do not crash on PG re-peering events when operations are in progress

This commit is contained in:
Vitaliy Filippov
2021-04-07 11:06:31 +03:00
parent f6d705383a
commit 97efb9e299
11 changed files with 81 additions and 79 deletions
+5 -1
View File
@@ -149,10 +149,14 @@ void osd_t::handle_flush_op(bool rollback, pool_id_t pool_id, pg_num_t pg_num, p
{
continue_primary_write(op);
}
if (pg.inflight == 0 && (pg.state & PG_STOPPING))
if ((pg.state & PG_STOPPING) && pg.inflight == 0 && !pg.flush_batch)
{
finish_stop_pg(pg);
}
else if ((pg.state & PG_REPEERING) && pg.inflight == 0 && !pg.flush_batch)
{
start_pg_peering(pg);
}
}
}