This is to avoid the scenarios in which pgs get activated before
PG_STATE_SNAPTRIM of the last pg interval gets cleared
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
(cherry picked from commit
2c216b95ece4a0ec7ad723bdd2b00efce3135b2d)
}
scrubber.on_interval_change();
obc_registry.invalidate_on_interval_change();
+ // snap trim events are all going to be interrupted,
+ // clearing PG_STATE_SNAPTRIM/PG_STATE_SNAPTRIM_ERROR here
+ // is save and in time.
+ peering_state.state_clear(PG_STATE_SNAPTRIM);
+ peering_state.state_clear(PG_STATE_SNAPTRIM_ERROR);
}
void PG::context_registry_on_change() {