mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 11:10:40 +00:00
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 <xemul@scylladb.com>
This commit is contained in:
@@ -6542,12 +6542,12 @@ storage_proxy::query_nonsingular_data_locally(schema_ptr s, lw_shared_ptr<query:
|
||||
co_return ret;
|
||||
}
|
||||
|
||||
future<> storage_proxy::start_hints_manager(shared_ptr<gms::gossiper> 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 {
|
||||
|
||||
@@ -694,7 +694,7 @@ public:
|
||||
mutation get_batchlog_mutation_for(const std::vector<mutation>& mutations, const utils::UUID& id, int32_t version, db_clock::time_point now);
|
||||
|
||||
future<> stop();
|
||||
future<> start_hints_manager(shared_ptr<gms::gossiper>);
|
||||
future<> start_hints_manager();
|
||||
void allow_replaying_hints() noexcept;
|
||||
future<> abort_view_writes();
|
||||
|
||||
|
||||
@@ -1783,8 +1783,8 @@ future<> storage_service::join_token_ring(sharded<db::system_distributed_keyspac
|
||||
// in the cluster -- either through gossiper, or by loading it from disk -- so it's safe
|
||||
// to start the hint managers.
|
||||
if (start_hm) {
|
||||
co_await proxy.invoke_on_all([&gossiper] (storage_proxy& local_proxy) {
|
||||
return local_proxy.start_hints_manager(gossiper.local().shared_from_this());
|
||||
co_await proxy.invoke_on_all([] (storage_proxy& local_proxy) {
|
||||
return local_proxy.start_hints_manager();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user