topology: set self host_id on the new topology
With this commit, we begin the next stage of the refactoring - updating the new version of the token_metadata in all places where the old version is currently being updated. In this commit we assign host_id of this node, both in main.cc and in boost tests.
This commit is contained in:
2
main.cc
2
main.cc
@@ -1212,6 +1212,8 @@ To start the scylla server proper, simply invoke as: scylla server (or just scyl
|
||||
// still be found in the config.
|
||||
tm.get_topology().set_host_id_cfg(host_id);
|
||||
tm.get_topology().add_or_update_endpoint(endpoint, host_id);
|
||||
tm.get_new()->get_topology().set_host_id_cfg(host_id);
|
||||
tm.get_new()->get_topology().add_or_update_endpoint(endpoint, host_id);
|
||||
return make_ready_future<>();
|
||||
}).get();
|
||||
|
||||
|
||||
@@ -648,6 +648,13 @@ private:
|
||||
std::nullopt,
|
||||
locator::node::state::normal,
|
||||
smp::count);
|
||||
auto& topo_new = tm.get_new()->get_topology();
|
||||
topo_new.set_host_id_cfg(hostid);
|
||||
topo_new.add_or_update_endpoint(utils::fb_utilities::get_broadcast_address(),
|
||||
hostid,
|
||||
std::nullopt,
|
||||
locator::node::state::normal,
|
||||
smp::count);
|
||||
return make_ready_future<>();
|
||||
}).get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user