mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 18:40:38 +00:00
locator::gossiping_property_file_snitch: initialize i_endpoint_snitch::io_cpu_id() in the constructor
This is just cleaner. Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
This commit is contained in:
@@ -62,8 +62,12 @@ future<bool> gossiping_property_file_snitch::property_file_was_modified() {
|
||||
}
|
||||
|
||||
gossiping_property_file_snitch::gossiping_property_file_snitch(
|
||||
const sstring& fname, unsigned io_cpu_id)
|
||||
: production_snitch_base(fname), _file_reader_cpu_id(io_cpu_id) {}
|
||||
const sstring& fname, unsigned io_cpuid)
|
||||
: production_snitch_base(fname), _file_reader_cpu_id(io_cpuid) {
|
||||
if (engine().cpu_id() == _file_reader_cpu_id) {
|
||||
io_cpu_id() = _file_reader_cpu_id;
|
||||
}
|
||||
}
|
||||
|
||||
future<> gossiping_property_file_snitch::start() {
|
||||
using namespace std::chrono_literals;
|
||||
@@ -82,8 +86,6 @@ future<> gossiping_property_file_snitch::start() {
|
||||
periodic_reader_callback();
|
||||
});
|
||||
|
||||
io_cpu_id() = _file_reader_cpu_id;
|
||||
|
||||
return read_property_file().then([this] {
|
||||
start_io();
|
||||
set_snitch_ready();
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
|
||||
gossiping_property_file_snitch(
|
||||
const sstring& fname = snitch_properties_filename,
|
||||
unsigned io_cpu_id = 0);
|
||||
unsigned io_cpuid = 0);
|
||||
|
||||
private:
|
||||
void periodic_reader_callback();
|
||||
|
||||
Reference in New Issue
Block a user