logger().debug("{}: {} snap_trimq={}", *this, __func__, snap_trimq);
peering_state.state_clear(PG_STATE_SNAPTRIM_ERROR);
// loops until snap_trimq is empty or SNAPTRIM_ERROR.
+ Ref<PG> pg_ref = this;
std::ignore = seastar::do_until(
[this] { return snap_trimq.empty()
|| peering_state.state_test(PG_STATE_SNAPTRIM_ERROR);
}).then([this, trimmed=to_trim] {
logger().debug("{}: trimmed snap={}", *this, trimmed);
});
- }).finally([this] {
+ }).finally([this, pg_ref] {
logger().debug("{}: PG::on_active_actmap() finished trimming",
*this);
peering_state.state_clear(PG_STATE_SNAPTRIM);