diff --git a/service/storage_service.hh b/service/storage_service.hh index abe38e0ff2..57dbd72622 100644 --- a/service/storage_service.hh +++ b/service/storage_service.hh @@ -794,6 +794,10 @@ private: public: int32_t get_exception_count(); + auto hold_async_gate() { + return _async_gate.hold(); + } + template auto run_with_api_lock(sstring operation, Func&& func) { return container().invoke_on(0, [operation = std::move(operation), @@ -804,8 +808,9 @@ public: template auto run_with_no_api_lock(Func&& func) { - return container().invoke_on(0, [func = std::forward(func)] (storage_service& ss) mutable { - return func(ss); + return container().invoke_on(0, [func = std::forward(func)] (storage_service& ss) mutable + -> futurize_t> { + co_return co_await futurize_invoke(func, ss); }); }