# Is leader sync cluster state to node when new node join cluster?

**URL:** <https://discuss.elastic.co/t/is-leader-sync-cluster-state-to-node-when-new-node-join-cluster/338185>\
**Category:** Elasticsearch\
**Created:** [July 12, 2023, 7:59am UTC](https://discuss.elastic.co/t/is-leader-sync-cluster-state-to-node-when-new-node-join-cluster/338185 "2023-07-12T07:59:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cm\_z](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cm_z/32/119671_2.png) [@cm\_z](https://discuss.elastic.co/u/cm_z)\
**Post date:** [July 12, 2023, 7:59am UTC](https://discuss.elastic.co/t/is-leader-sync-cluster-state-to-node-when-new-node-join-cluster/338185/1 "2023-07-12T07:59:41Z")

</div>

When a new node or a previously joined node that was later expelled joins a stable cluster, will the leader synchronize the latest cluster status with them? If so, who can tell me where to find this functionality? I have traced the relevant source code but have not found the related feature.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 12, 2023, 12:29pm UTC](https://discuss.elastic.co/t/is-leader-sync-cluster-state-to-node-when-new-node-join-cluster/338185/3 "2023-07-12T12:29:53Z")

</div>

Please be patient in waiting for responses to your question and refrain from pinging multiple times asking for a response or opening multiple topics for the same question. This is a community forum, it may take time for someone to reply to your question. For more information please refer to the [Community Code of Conduct](https://www.elastic.co/community/codeofconduct) specifically the section "Be patient". Also, please refrain from pinging folks directly, this is a forum and anyone that participates might be able to assist you.

If you are in need of a service with an SLA that covers response times for questions then you may want to consider talking to us about a [subscription](https://www.elastic.co/subscriptions).

It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 12, 2023, 12:47pm UTC](https://discuss.elastic.co/t/is-leader-sync-cluster-state-to-node-when-new-node-join-cluster/338185/4 "2023-07-12T12:47:51Z")

</div>

The answer is yes: in `o.e.c.c.PublicationTransportHandler.PublicationContext` see how `sendFullClusterState` is called if `sendClusterStateDiff` gets an `IncompatibleClusterStateVersionException`, or if `previousState.nodes().nodeExists(destination) == false`.

---

<div class="post-metadata">

**Author:** ![cm\_z](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cm_z/32/119671_2.png) [@cm\_z](https://discuss.elastic.co/u/cm_z)\
**Post date:** [July 13, 2023, 2:03am UTC](https://discuss.elastic.co/t/is-leader-sync-cluster-state-to-node-when-new-node-join-cluster/338185/5 "2023-07-13T02:03:39Z")

</div>

Thank you for your response. Is the main triggering entry point org.elasticsearch.cluster.coordination.JoinHelper$LeaderJoinAccumulator handleJoinRequest? I see that a "node-join" cluster publishing task will be triggered here for newly joined nodes, which will publish the latest cluster status (including the newly joined node) to all nodes in the cluster (including all nodes).

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 13, 2023, 5:54am UTC](https://discuss.elastic.co/t/is-leader-sync-cluster-state-to-node-when-new-node-join-cluster/338185/6 "2023-07-13T05:54:58Z")

</div>

Yes that's right.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 10, 2023, 5:55am UTC](https://discuss.elastic.co/t/is-leader-sync-cluster-state-to-node-when-new-node-join-cluster/338185/7 "2023-08-10T05:55:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
