When we get a lease_ack, leave the laggy state.
Signed-off-by: Sage Weil <sage@redhat.com>
}
}
if (was_min) {
+ auto old_ru = readable_until;
recalc_readable_until();
-// if (pl->is_laggy() && readable_until > now) {
-#warning fixme: wake up?
- //}
+ if (now < old_ru) {
+ pl->recheck_readable();
+ }
}
}
virtual ceph::signedspan get_mnow() = 0;
virtual HeartbeatStampsRef get_hb_stamps(int peer) = 0;
virtual void schedule_renew_lease(epoch_t plr, ceph::timespan delay) = 0;
+ virtual void recheck_readable() = 0;
// ============ Flush state ==================
/**
return false;
}
+void PrimaryLogPG::recheck_readable()
+{
+ if (is_laggy()) {
+ auto ru = recovery_state.get_readable_until();
+ auto mnow = osd->get_mnow();
+ if (ru > mnow) {
+ dout(10) << __func__ << " no longer laggy (ru " << ru << " > mnow " << mnow
+ << ")" << dendl;
+ state_clear(PG_STATE_LAGGY);
+ publish_stats_to_osd();
+ requeue_ops(waiting_for_readable);
+ }
+ }
+}
+
bool PrimaryLogPG::pgls_filter(const PGLSFilter& filter, const hobject_t& sobj)
{
bufferlist bl;
bool check_laggy(OpRequestRef& op);
bool check_laggy_requeue(OpRequestRef& op);
+ void recheck_readable() override;
bool is_backfill_target(pg_shard_t osd) const {
return recovery_state.is_backfill_target(osd);