Skip to content

Commit

Permalink
proxy: Coroutinize start_hints_manager()
Browse files Browse the repository at this point in the history
All the other calls managing hints are coroutinized

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>

Closes #15641
  • Loading branch information
xemul authored and kbr-scylla committed Oct 5, 2023
1 parent 96787ec commit 967faa9
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions service/storage_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6347,15 +6347,11 @@ storage_proxy::query_nonsingular_data_locally(schema_ptr s, lw_shared_ptr<query:
}

future<> storage_proxy::start_hints_manager(shared_ptr<gms::gossiper> g) {
future<> f = make_ready_future<>();
if (!_hints_manager.is_disabled_for_all()) {
f = _hints_resource_manager.register_manager(_hints_manager);
co_await _hints_resource_manager.register_manager(_hints_manager);
}
return f.then([this] {
return _hints_resource_manager.register_manager(_hints_for_views_manager);
}).then([this, g = std::move(g)] () mutable {
return _hints_resource_manager.start(shared_from_this(), std::move(g));
});
co_await _hints_resource_manager.register_manager(_hints_for_views_manager);
co_await _hints_resource_manager.start(shared_from_this(), std::move(g));
}

void storage_proxy::allow_replaying_hints() noexcept {
Expand Down

0 comments on commit 967faa9

Please sign in to comment.