f->close_section();
}
-SnapTrimEvent::remove_or_update_ertr::future<seastar::stop_iteration>
+SnapTrimEvent::snap_trim_ertr::future<seastar::stop_iteration>
SnapTrimEvent::start()
{
logger().debug("{}: {}", *this, __func__);
return pg->request_pg_pipeline;
}
-SnapTrimEvent::remove_or_update_ertr::future<seastar::stop_iteration>
+SnapTrimEvent::snap_trim_ertr::future<seastar::stop_iteration>
SnapTrimEvent::with_pg(
ShardServices &shard_services, Ref<PG> _pg)
{
}).then_interruptible([&shard_services, this] (const auto& to_trim) {
if (to_trim.empty()) {
// the legit ENOENT -> done
- return remove_or_update_iertr::make_ready_future<seastar::stop_iteration>(
+ return snap_trim_iertr::make_ready_future<seastar::stop_iteration>(
seastar::stop_iteration::yes);
}
for (const auto& object : to_trim) {
});
}).safe_then_interruptible([this] {
logger().debug("{}: all completed", *this);
- return remove_or_update_iertr::make_ready_future<seastar::stop_iteration>(
+ return snap_trim_iertr::make_ready_future<seastar::stop_iteration>(
seastar::stop_iteration::no);
});
});
});
- }, [this](std::exception_ptr eptr) {
- // TODO: better debug output
+ }, [this](std::exception_ptr eptr) -> snap_trim_ertr::future<seastar::stop_iteration> {
logger().debug("{}: interrupted {}", *this, eptr);
- return remove_or_update_ertr::make_ready_future<seastar::stop_iteration>(
- seastar::stop_iteration::no);
+ return crimson::ct_error::eagain::make();
}, pg);
}
using remove_or_update_iertr =
crimson::interruptible::interruptible_errorator<
IOInterruptCondition, remove_or_update_ertr>;
+ using snap_trim_ertr = remove_or_update_ertr::extend<
+ crimson::ct_error::eagain>;
+ using snap_trim_iertr = remove_or_update_iertr::extend<
+ crimson::ct_error::eagain>;
static constexpr OperationTypeCode type = OperationTypeCode::snaptrim_event;
void print(std::ostream &) const final;
void dump_detail(ceph::Formatter* f) const final;
- remove_or_update_ertr::future<seastar::stop_iteration> start();
- remove_or_update_ertr::future<seastar::stop_iteration> with_pg(
+ snap_trim_ertr::future<seastar::stop_iteration> start();
+ snap_trim_ertr::future<seastar::stop_iteration> with_pg(
ShardServices &shard_services, Ref<PG> pg);
private:
publish_stats_to_osd();
return seastar::make_ready_future<seastar::stop_iteration>(
seastar::stop_iteration::yes);
+ }), crimson::ct_error::eagain::handle([this] {
+ logger().info("{}: EAGAIN saw, trimming restarted", *this);
+ return seastar::make_ready_future<seastar::stop_iteration>(
+ seastar::stop_iteration::no);
})
);
}).then([this, trimmed=to_trim] {