diff --git a/gms/gossiper.cc b/gms/gossiper.cc index 6aa3a40e5a..18b4642dbf 100644 --- a/gms/gossiper.cc +++ b/gms/gossiper.cc @@ -2005,8 +2005,8 @@ future<> gossiper::advertise_to_nodes(generation_for_nodes advertise_to_nodes) { }); } -future<> gossiper::do_shadow_round(std::unordered_set nodes) { - return seastar::async([this, g = this->shared_from_this(), nodes = std::move(nodes)] () mutable { +future<> gossiper::do_shadow_round(std::unordered_set nodes, mandatory is_mandatory) { + return seastar::async([this, g = this->shared_from_this(), nodes = std::move(nodes), is_mandatory] () mutable { nodes.erase(get_broadcast_address()); gossip_get_endpoint_states_request request{{ gms::application_state::STATUS, @@ -2046,7 +2046,7 @@ future<> gossiper::do_shadow_round(std::unordered_set nodes) if (!nodes_talked.empty()) { break; } - if (nodes_down == nodes.size()) { + if (nodes_down == nodes.size() && !is_mandatory) { logger.warn("All nodes={} are down for get_endpoint_states verb. Skip ShadowRound.", nodes); break; } diff --git a/gms/gossiper.hh b/gms/gossiper.hh index f2e7a9dd37..2ce4d129a0 100644 --- a/gms/gossiper.hh +++ b/gms/gossiper.hh @@ -589,10 +589,11 @@ public: gms::advertise_myself advertise = gms::advertise_myself::yes); public: + using mandatory = bool_class; /** * Do a single 'shadow' round of gossip, where we do not modify any state */ - future<> do_shadow_round(std::unordered_set nodes); + future<> do_shadow_round(std::unordered_set nodes, mandatory is_mandatory); private: void build_seeds_list(); diff --git a/service/storage_service.cc b/service/storage_service.cc index 42cc479ba2..cb708ff229 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -2846,7 +2846,7 @@ future<> storage_service::join_token_ring(sharded storage_service::check_for_endpoint_collision(std::unordered_set // make magic happen slogger.info("Performing gossip shadow round"); - co_await _gossiper.do_shadow_round(initial_contact_nodes); + co_await _gossiper.do_shadow_round(initial_contact_nodes, gms::gossiper::mandatory::yes); if (!_raft_topology_change_enabled) { auto local_features = _feature_service.supported_feature_set(); _gossiper.check_knows_remote_features(local_features, loaded_peer_features);