}
};
-template <>
-struct EventBackendRegistry<osd::BackfillRecovery> {
- static std::tuple<> get_backends() {
- return {};
- }
-};
-
template <>
struct EventBackendRegistry<osd::PGAdvanceMap> {
static std::tuple<> get_backends() {
});
}
-PGPeeringPipeline &BackfillRecovery::peering_pp(PG &pg)
-{
- return pg.peering_request_pg_pipeline;
-}
-
-BackfillRecovery::interruptible_future<bool>
-BackfillRecovery::do_recovery()
-{
- LOG_PREFIX(BackfillRecovery::do_recovery);
- DEBUGDPPI("{}", *pg, __func__);
-
- if (pg->has_reset_since(epoch_started)) {
- DEBUGDPPI("{}: pg got reset since epoch_started={}",
- *pg, __func__, epoch_started);
- return seastar::make_ready_future<bool>(false);
- }
- // TODO: limits
- return enter_stage<interruptor>(
- // process_event() of our boost::statechart machine is non-reentrant.
- // with the backfill_pipeline we protect it from a second entry from
- // the implementation of BackfillListener.
- // additionally, this stage serves to synchronize with PeeringEvent.
- peering_pp(*pg).process
- ).then_interruptible([this] {
- pg->get_recovery_handler()->dispatch_backfill_event(std::move(evt));
- return handle.complete();
- }).then_interruptible([] {
- return seastar::make_ready_future<bool>(false);
- }).finally([this] {
- handle.exit();
- });
-}
-
template class BackgroundRecoveryT<UrgentRecovery>;
template class BackgroundRecoveryT<PglogBasedRecovery>;
-template class BackgroundRecoveryT<BackfillRecovery>;
} // namespace crimson::osd
/// represent a recovery initiated for serving a client request
///
-/// unlike @c PglogBasedRecovery and @c BackfillRecovery,
-/// @c UrgentRecovery is not throttled by the scheduler. and it
-/// utilizes @c RecoveryBackend directly to recover the unreadable
-/// object.
+/// unlike @c PglogBasedRecovery, @c UrgentRecovery is not throttled
+/// by the scheduler. and it utilizes @c RecoveryBackend directly to
+/// recover the unreadable object.
class UrgentRecovery final : public BackgroundRecoveryT<UrgentRecovery> {
public:
UrgentRecovery(
bool cancelled = false;
};
-class BackfillRecovery final : public BackgroundRecoveryT<BackfillRecovery> {
-public:
-
- template <class EventT>
- BackfillRecovery(
- Ref<PG> pg,
- ShardServices &ss,
- epoch_t epoch_started,
- const EventT& evt);
-
- PipelineHandle& get_handle() { return handle; }
-
- std::tuple<
- OperationThrottler::BlockingEvent,
- PGPeeringPipeline::Process::BlockingEvent
- > tracking_events;
-
-private:
- boost::intrusive_ptr<const boost::statechart::event_base> evt;
- PipelineHandle handle;
-
- static PGPeeringPipeline &peering_pp(PG &pg);
- interruptible_future<bool> do_recovery() override;
-};
-
-template <class EventT>
-BackfillRecovery::BackfillRecovery(
- Ref<PG> pg,
- ShardServices &ss,
- const epoch_t epoch_started,
- const EventT& evt)
- : BackgroundRecoveryT(
- std::move(pg),
- ss,
- epoch_started,
- crimson::osd::scheduler::scheduler_class_t::background_best_effort),
- evt(evt.intrusive_from_this())
-{}
-
}
#if FMT_VERSION >= 90000
-template <> struct fmt::formatter<crimson::osd::BackfillRecovery> : fmt::ostream_formatter {};
template <> struct fmt::formatter<crimson::osd::PglogBasedRecovery> : fmt::ostream_formatter {};
template <> struct fmt::formatter<crimson::osd::UrgentRecovery> : fmt::ostream_formatter {};
template <class T> struct fmt::formatter<crimson::osd::BackgroundRecoveryT<T>> : fmt::ostream_formatter {};
class OSD;
class ShardServices;
class PG;
-class BackfillRecovery;
template <class T>
class PeeringEvent : public PhasedOperationT<T> {
namespace crimson::osd {
class OpsExecuter;
-class BackfillRecovery;
class SnapTrimEvent;
class PglogBasedRecovery;
friend class RepRequest;
friend class LogMissingRequest;
friend class LogMissingRequestReply;
- friend class BackfillRecovery;
friend struct PGFacade;
friend class InternalClientRequest;
friend class WatchTimeoutRequest;
void PGRecovery::backfill_suspended()
{
- // We are not creating a new BackfillRecovery request here, as we
- // need to cancel the backfill synchronously (before this method returns).
using BackfillState = crimson::osd::BackfillState;
backfill_state->process_event(
BackfillState::SuspendBackfill{}.intrusive_from_this());