From a1dbaba9e1f0c83bc7dd0221c612c869af489be7 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Fri, 26 Jul 2024 15:49:35 +0300 Subject: [PATCH] proxy: Use remote gossiper to start hints resource manager By the time hinst resource manager is started, proxy already has its remote part initialized. Remote returns const gossiper pointer, but after previous change hints code can live with it. Signed-off-by: Pavel Emelyanov --- service/storage_proxy.cc | 4 ++-- service/storage_proxy.hh | 2 +- service/storage_service.cc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/service/storage_proxy.cc b/service/storage_proxy.cc index d86dfe2441..cb28db9912 100644 --- a/service/storage_proxy.cc +++ b/service/storage_proxy.cc @@ -6542,12 +6542,12 @@ storage_proxy::query_nonsingular_data_locally(schema_ptr s, lw_shared_ptr storage_proxy::start_hints_manager(shared_ptr g) { +future<> storage_proxy::start_hints_manager() { if (!_hints_manager.is_disabled_for_all()) { co_await _hints_resource_manager.register_manager(_hints_manager); } co_await _hints_resource_manager.register_manager(_hints_for_views_manager); - co_await _hints_resource_manager.start(std::move(g)); + co_await _hints_resource_manager.start(remote().gossiper().shared_from_this()); } void storage_proxy::allow_replaying_hints() noexcept { diff --git a/service/storage_proxy.hh b/service/storage_proxy.hh index 9dca5d99c3..3e03cd8c10 100644 --- a/service/storage_proxy.hh +++ b/service/storage_proxy.hh @@ -694,7 +694,7 @@ public: mutation get_batchlog_mutation_for(const std::vector& mutations, const utils::UUID& id, int32_t version, db_clock::time_point now); future<> stop(); - future<> start_hints_manager(shared_ptr); + future<> start_hints_manager(); void allow_replaying_hints() noexcept; future<> abort_view_writes(); diff --git a/service/storage_service.cc b/service/storage_service.cc index fa71e227f4..38761af893 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -1783,8 +1783,8 @@ future<> storage_service::join_token_ring(sharded