snapid);
subop_blocker.emplace_back(op->get_id(), std::move(fut));
}
- return subop_blocker.wait_completion().then([] {
- return seastar::make_ready_future<seastar::stop_iteration>(
- seastar::stop_iteration::no);
+ return enter_stage<interruptor>(
+ wait_subop
+ ).then_interruptible([this] {
+ logger().debug("{}: awaiting completion", *this);
+ return subop_blocker.wait_completion().then([this] {
+ logger().debug("{}: all completed", *this);
+ return interruptor::make_ready_future<seastar::stop_iteration>(
+ seastar::stop_iteration::no);
+ });
});
});
});
private:
std::vector<id_done_t> subops;
} subop_blocker;
+
+ // we don't need to synchronize with other instances of SnapTrimEvent;
+ // it's here for the sake of op tracking.
+ struct WaitSubop : OrderedConcurrentPhaseT<WaitSubop> {
+ static constexpr auto type_name = "SnapTrimEvent::wait_subop";
+ } wait_subop;
+
PipelineHandle handle;
Ref<PG> pg;
SnapMapper& snap_mapper;
CommonPGPipeline::RecoverMissing::BlockingEvent,
CommonPGPipeline::GetOBC::BlockingEvent,
CommonPGPipeline::Process::BlockingEvent,
+ WaitSubop::BlockingEvent,
CompletionEvent
> tracking_events;
};