}
}
}
-
-bool PrimaryLogScrub::should_requeue_blocked_ops(eversion_t last_recovery_applied) const
-{
- if (!is_scrub_active()) {
- // just verify that things indeed are quiet
- ceph_assert(m_start == m_end);
- return false;
- }
-
- return last_recovery_applied >= m_subset_last_update;
-}
bool get_store_errors(const scrub_ls_arg_t& arg,
scrub_ls_result_t& res_inout) const final;
- /**
- * should we requeue blocked ops?
- * Yes - if our 'subset_last_applied' is less up-to-date than the
- * new recovery_state.get_last_update_applied().
- * (used by PrimaryLogPG::op_applied())
- */
- [[nodiscard]] bool should_requeue_blocked_ops(
- eversion_t last_recovery_applied) const final;
-
void stats_of_handled_objects(const object_stat_sum_t& delta_stats,
const hobject_t& soid) final;
/// handle a message carrying a replica map
void map_from_replica(OpRequestRef op) final;
- /**
- * should we requeue blocked ops?
- * Applicable to the PrimaryLogScrub derived class.
- */
- [[nodiscard]] virtual bool should_requeue_blocked_ops(
- eversion_t last_recovery_applied) const override
- {
- return false;
- }
-
void scrub_clear_state() final;
/**
// -------------------------------------------------------------------------------------------
// the I/F used by the state-machine (i.e. the implementation of ScrubMachineListener)
+ [[nodiscard]] bool is_primary() const final { return m_pg->recovery_state.is_primary(); }
+
bool select_range() final;
/// walk the log to find the latest update that affects our chunk
void state_set(uint64_t m) { m_pg->state_set(m); }
void state_clear(uint64_t m) { m_pg->state_clear(m); }
- [[nodiscard]] bool is_primary() const { return m_pg->recovery_state.is_primary(); }
-
[[nodiscard]] bool is_scrub_registered() const;
virtual void _scrub_clear_state() {}
virtual ~ScrubMachineListener(){};
+ [[nodiscard]] virtual bool is_primary() const = 0;
+
virtual bool select_range() = 0;
/// walk the log to find the latest update that affects our chunk
virtual void send_sched_replica(epoch_t epoch_queued) = 0;
-// virtual void send_full_reset(epoch_t epoch_queued) = 0;
-//
-// virtual void send_chunk_free(epoch_t epoch_queued) = 0;
-//
-// virtual void send_chunk_busy(epoch_t epoch_queued) = 0;
-//
-// virtual void send_local_map_done(epoch_t epoch_queued) = 0;
-//
-// virtual void send_get_next_chunk(epoch_t epoch_queued) = 0;
-//
-// virtual void send_scrub_is_finished(epoch_t epoch_queued) = 0;
-//
-// virtual void send_maps_compared(epoch_t epoch_queued) = 0;
-
virtual void on_applied_when_primary(const eversion_t &applied_version) = 0;
// --------------------------------------------------
virtual void add_callback(Context* context) = 0;
- /// should we requeue blocked ops?
- [[nodiscard]] virtual bool should_requeue_blocked_ops(
- eversion_t last_recovery_applied) const = 0;
-
/// add to scrub statistics, but only if the soid is below the scrub start
virtual void stats_of_handled_objects(const object_stat_sum_t& delta_stats,
const hobject_t& soid) = 0;