mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-02 13:06:57 +00:00
storage_service: join_token_ring: reuse replacement_info.address
Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
@@ -482,7 +482,7 @@ future<> storage_service::join_token_ring(cdc::generation_service& cdc_gen_servi
|
||||
// (post CASSANDRA-1391 we don't expect this to be necessary very often, but it doesn't hurt to be careful)
|
||||
co_await wait_for_ring_to_settle(delay);
|
||||
|
||||
if (!is_replacing()) {
|
||||
if (!replace_address) {
|
||||
auto tmptr = get_token_metadata_ptr();
|
||||
|
||||
if (tmptr->is_normal_token_owner(get_broadcast_address())) {
|
||||
@@ -500,12 +500,10 @@ future<> storage_service::join_token_ring(cdc::generation_service& cdc_gen_servi
|
||||
bootstrap_tokens = boot_strapper::get_bootstrap_tokens(tmptr, _db.local().get_config(), dht::check_token_endpoint::yes);
|
||||
}
|
||||
} else {
|
||||
auto replace_addr = get_replace_address();
|
||||
assert(replace_addr);
|
||||
if (*replace_addr != get_broadcast_address()) {
|
||||
if (*replace_address != get_broadcast_address()) {
|
||||
// Sleep additionally to make sure that the server actually is not alive
|
||||
// and giving it more time to gossip if alive.
|
||||
slogger.info("Sleeping before replacing {}...", *replace_addr);
|
||||
slogger.info("Sleeping before replacing {}...", *replace_address);
|
||||
co_await sleep_abortable(2 * get_ring_delay(), _abort_source);
|
||||
|
||||
// check for operator errors...
|
||||
@@ -522,7 +520,7 @@ future<> storage_service::join_token_ring(cdc::generation_service& cdc_gen_servi
|
||||
}
|
||||
}
|
||||
} else {
|
||||
slogger.info("Sleeping before replacing {}...", *replace_addr);
|
||||
slogger.info("Sleeping before replacing {}...", *replace_address);
|
||||
co_await sleep_abortable(get_ring_delay(), _abort_source);
|
||||
}
|
||||
slogger.info("Replacing a node with token(s): {}", bootstrap_tokens);
|
||||
|
||||
Reference in New Issue
Block a user