diff --git a/gms/gossiper.cc b/gms/gossiper.cc index b759672e35..4be51241d8 100644 --- a/gms/gossiper.cc +++ b/gms/gossiper.cc @@ -2093,7 +2093,9 @@ future<> gossiper::start_gossiping(gms::generation_type generation_nbr, applicat generation_nbr = gms::generation_type(_gcfg.force_gossip_generation()); logger.warn("Use the generation number provided by user: generation = {}", generation_nbr); } - endpoint_state local_state = my_endpoint_state(); + + // Create a new local state. + endpoint_state local_state{get_broadcast_address()}; local_state.set_heart_beat_state_and_update_timestamp(heart_beat_state(generation_nbr)); for (auto& entry : preload_local_states) { local_state.add_application_state(entry.first, entry.second); @@ -2103,7 +2105,7 @@ future<> gossiper::start_gossiping(gms::generation_type generation_nbr, applicat co_await replicate(local_state, permit.id()); - logger.info("Gossip started with local state: {}", local_state); + logger.info("Gossip started with local state: {}", my_endpoint_state()); _enabled = true; _nr_run = 0; _scheduled_gossip_task.arm(INTERVAL); diff --git a/test/cluster/test_gossiper_empty_self_id_on_shadow_round.py b/test/cluster/test_gossiper_empty_self_id_on_shadow_round.py index 3faa459897..290112c0f8 100644 --- a/test/cluster/test_gossiper_empty_self_id_on_shadow_round.py +++ b/test/cluster/test_gossiper_empty_self_id_on_shadow_round.py @@ -17,7 +17,6 @@ from test.pylib.manager_client import ManagerClient @pytest.mark.asyncio @skip_mode('release', 'error injections are not supported in release mode') -@pytest.mark.xfail(reason="https://github.com/scylladb/scylladb/issues/25831") async def test_gossiper_empty_self_id_on_shadow_round(manager: ManagerClient): """ Test gossiper race condition on bootstrap that can lead to an empty self host ID sent in replies to other nodes.