diff --git a/api/storage_service.cc b/api/storage_service.cc index ac974bb819..33ddb60ef5 100644 --- a/api/storage_service.cc +++ b/api/storage_service.cc @@ -527,11 +527,12 @@ void set_view_builder(http_context& ctx, routes& r, sharded req) { + cf::get_built_indexes.set(r, [&vb](std::unique_ptr req) -> future { auto [ks, cf_name] = parse_fully_qualified_cf_name(req->get_path_param("name")); // Use of load_built_views() as filtering table should be in sync with // built_indexes_virtual_reader filtering with BUILT_VIEWS table - return vb.local().get_sys_ks().load_built_views().then([ks, cf_name, &vb](const std::vector& vn) mutable { + std::vector vn = co_await vb.local().get_sys_ks().load_built_views(); + { std::set vp; for (auto b : vn) { if (b.first == ks) { @@ -548,8 +549,8 @@ void set_view_builder(http_context& ctx, routes& r, sharded(res); - }); + co_return res; + } }); }