diff --git a/locator/ec2_multi_region_snitch.cc b/locator/ec2_multi_region_snitch.cc index 38b2892a60..485e4bd952 100644 --- a/locator/ec2_multi_region_snitch.cc +++ b/locator/ec2_multi_region_snitch.cc @@ -98,18 +98,12 @@ future<> ec2_multi_region_snitch::gossiper_starting() { // this function will be executed on CPU0 only. // - using namespace gms; - auto& g = get_local_gossiper(); - - return gossip_snitch_info({ - { application_state::INTERNAL_IP, versioned_value::internal_ip(_local_private_address) } - }).then([this] { if (!_gossip_started) { gms::get_local_gossiper().register_(::make_shared(_my_dc)); _gossip_started = true; } - }); + return make_ready_future<>(); } std::list> ec2_multi_region_snitch::get_app_states() const { diff --git a/locator/gossiping_property_file_snitch.cc b/locator/gossiping_property_file_snitch.cc index cdfde17d14..6d1391ae6f 100644 --- a/locator/gossiping_property_file_snitch.cc +++ b/locator/gossiping_property_file_snitch.cc @@ -103,25 +103,12 @@ void gossiping_property_file_snitch::periodic_reader_callback() { } future<> gossiping_property_file_snitch::gossiper_starting() { - using namespace gms; - using namespace service; // // Note: currently gossiper "main" instance always runs on CPU0 therefore // this function will be executed on CPU0 only. // - auto& g = get_local_gossiper(); - - auto local_internal_addr = g.get_local_messaging().listen_address(); - std::ostringstream ostrm; - - ostrm<> gossiping_property_file_snitch::get_app_states() const { diff --git a/locator/snitch_base.hh b/locator/snitch_base.hh index a5948f7ad1..2405e72265 100644 --- a/locator/snitch_base.hh +++ b/locator/snitch_base.hh @@ -93,7 +93,7 @@ public: */ virtual future<> gossiper_starting() { _gossip_started = true; - return gossip_snitch_info({}); + return make_ready_future<>(); } /** diff --git a/service/storage_service.cc b/service/storage_service.cc index fe5db108d7..9b78571032 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -346,6 +346,10 @@ void storage_service::prepare_to_join( app_states.emplace(gms::application_state::SHARD_COUNT, versioned_value::shard_count(smp::count)); app_states.emplace(gms::application_state::IGNORE_MSB_BITS, versioned_value::ignore_msb_bits(_db.local().get_config().murmur3_partitioner_ignore_msb_bits())); + for (auto&& s : snitch->get_app_states()) { + app_states.emplace(s.first, std::move(s.second)); + } + slogger.info("Starting up server gossip"); auto generation_number = db::system_keyspace::increment_and_get_generation().get0();