snitch: Remove gossiper_starting()

No longer used

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
Pavel Emelyanov
2022-03-31 13:49:15 +03:00
parent 41332e183a
commit 05a32328fc
6 changed files with 0 additions and 38 deletions

View File

@@ -1824,9 +1824,6 @@ future<> gossiper::start_gossiping(int generation_nbr, std::map<application_stat
co_await replicate(get_broadcast_address(), local_state);
//notify snitches that Gossiper is about to start
co_await locator::i_endpoint_snitch::get_local_snitch_ptr()->gossiper_starting();
logger.trace("gossip started with generation {}", generation);
_enabled = true;
_nr_run = 0;

View File

@@ -97,16 +97,6 @@ void ec2_multi_region_snitch::set_local_private_addr(const sstring& addr_str) {
_local_private_address = addr_str;
}
future<> ec2_multi_region_snitch::gossiper_starting() {
//
// Note: currently gossiper "main" instance always runs on CPU0 therefore
// this function will be executed on CPU0 only.
//
_gossip_started = true;
return make_ready_future<>();
}
std::list<std::pair<gms::application_state, gms::versioned_value>> ec2_multi_region_snitch::get_app_states() const {
return {
{gms::application_state::DC, gms::versioned_value::datacenter(_my_dc)},

View File

@@ -16,7 +16,6 @@ namespace locator {
class ec2_multi_region_snitch : public ec2_snitch {
public:
ec2_multi_region_snitch(const sstring& fname = "", unsigned io_cpu_id = 0);
virtual future<> gossiper_starting() override;
virtual std::list<std::pair<gms::application_state, gms::versioned_value>> get_app_states() const override;
virtual future<> start() override;
virtual void set_local_private_addr(const sstring& addr_str) override;

View File

@@ -102,15 +102,6 @@ void gossiping_property_file_snitch::periodic_reader_callback() {
});
}
future<> gossiping_property_file_snitch::gossiper_starting() {
//
// Note: currently gossiper "main" instance always runs on CPU0 therefore
// this function will be executed on CPU0 only.
//
_gossip_started = true;
return make_ready_future<>();
}
std::list<std::pair<gms::application_state, gms::versioned_value>> gossiping_property_file_snitch::get_app_states() const {
sstring ip = format("{}", gms::get_local_gossiper().get_local_messaging().listen_address());
return {

View File

@@ -36,7 +36,6 @@ public:
return std::chrono::seconds(60);
}
virtual future<> gossiper_starting() override;
virtual std::list<std::pair<gms::application_state, gms::versioned_value>> get_app_states() const override;
virtual future<> stop() override;
virtual future<> start() override;

View File

@@ -87,15 +87,6 @@ public:
virtual int compare_endpoints(
inet_address& target, inet_address& a1, inet_address& a2) = 0;
/**
* called after Gossiper instance exists immediately before it starts
* gossiping
*/
virtual future<> gossiper_starting() {
_gossip_started = true;
return make_ready_future<>();
}
/**
* returns whatever info snitch wants to gossip
*/
@@ -168,10 +159,6 @@ public:
//noop by default
}
bool local_gossiper_started() {
return _gossip_started;
}
virtual future<> reload_gossiper_state() {
// noop by default
return make_ready_future<>();
@@ -202,7 +189,6 @@ protected:
stopping,
stopped
} _state = snitch_state::initializing;
bool _gossip_started = false;
};
struct snitch_ptr {