diff --git a/gms/gossiper.hh b/gms/gossiper.hh index 132b255402..8b8b8c857f 100644 --- a/gms/gossiper.hh +++ b/gms/gossiper.hh @@ -499,7 +499,7 @@ public: bool is_silent_shutdown_state(const endpoint_state& ep_state) const; void mark_as_shutdown(const inet_address& endpoint); void force_newer_generation(); -private: +public: sstring get_gossip_status(const endpoint_state& ep_state) const; sstring get_gossip_status(const inet_address& endpoint) const; public: diff --git a/service/storage_service.cc b/service/storage_service.cc index 7dd8775431..9f13762625 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -1145,15 +1145,10 @@ future<> storage_service::check_for_endpoint_collision() { if (dht::range_streamer::use_strict_consistency()) { found_bootstrapping_node = false; for (auto& x : gossiper.get_endpoint_states()) { - auto status = x.second.get_application_state(application_state::STATUS); - if (!status) { + auto state = gossiper.get_gossip_status(x.second); + if (state.empty()) { continue; } - - std::vector pieces; - boost::split(pieces, status.value().value, boost::is_any_of(sstring(versioned_value::DELIMITER_STR))); - assert(pieces.size() > 0); - auto state = pieces[0]; logger.debug("Checking bootstrapping/leaving/moving nodes: node={}, status={} (check_for_endpoint_collision)", x.first, state); if (state == sstring(versioned_value::STATUS_BOOTSTRAPPING) || state == sstring(versioned_value::STATUS_LEAVING) ||