void PrimaryLogPG::snap_trimmer_scrub_complete()
{
- if (is_primary() && is_active() && is_clean()) {
- ceph_assert(!snap_trimq.empty());
+ if (is_primary() && is_active() && is_clean() && !snap_trimq.empty()) {
+ dout(10) << "scrub finished - requeuing snap_trimmer" << dendl;
snap_trimmer_machine.process_event(ScrubComplete());
}
}
dout(10) << "scrubber event --<< StartScrub" << dendl;
} else {
clear_queued_or_active();
+ // and just in case snap trimming was blocked by the aborted scrub
+ m_pg->snap_trimmer_scrub_complete();
}
}
dout(10) << "scrubber event --<< AfterRepairScrub" << dendl;
} else {
clear_queued_or_active();
+ // and just in case snap trimming was blocked by the aborted scrub
+ m_pg->snap_trimmer_scrub_complete();
}
}
&t);
int tr = m_osds->store->queue_transaction(m_pg->ch, std::move(t), nullptr);
ceph_assert(tr == 0);
-
- if (!m_pg->snap_trimq.empty()) {
- dout(10) << "scrub finished, requeuing snap_trimmer" << dendl;
- m_pg->snap_trimmer_scrub_complete();
- }
}
if (has_error) {
if (m_pg->is_active() && m_pg->is_primary()) {
m_pg->recovery_state.share_pg_info();
}
+
+ // we may have blocked the snap trimmer
+ m_pg->snap_trimmer_scrub_complete();
}
void PgScrubber::on_digest_updates()