# How does Elasticsearch propagate index mappings to all primary and replica shards?

**URL:** <https://discuss.elastic.co/t/how-does-elasticsearch-propagate-index-mappings-to-all-primary-and-replica-shards/369432>\
**Category:** Elasticsearch\
**Created:** [October 25, 2024, 2:22pm UTC](https://discuss.elastic.co/t/how-does-elasticsearch-propagate-index-mappings-to-all-primary-and-replica-shards/369432 "2024-10-25T14:22:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hamza\_Belmellouki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamza_belmellouki/32/136426_2.png) [@Hamza\_Belmellouki](https://discuss.elastic.co/u/Hamza_Belmellouki)\
**Post date:** [October 25, 2024, 2:22pm UTC](https://discuss.elastic.co/t/how-does-elasticsearch-propagate-index-mappings-to-all-primary-and-replica-shards/369432/1 "2024-10-25T14:22:19Z")

</div>

Hello,  
I'm trying to understand how Elasticsearch ensures consistency of index mappings across all primary and replica shards. Specifically:

1. When an index is created with mappings, does the master node propagate these mappings to all shards?
2. How does Elasticsearch manage updates to mappings (e.g., when new fields are dynamically added) across primary and replica shards?
3. Is there any situation where mapping consistency might fail across shards, and if so, how is that managed?

I've reviewed the Elasticsearch documentation on [mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) and [shard allocation](https://www.elastic.co/guide/en/elasticsearch/reference/current/shard-allocation-filtering.html), but I haven't found explicit details on this propagation mechanism. Any insight into how the master node interacts with shards for mapping synchronization would be helpful.

---

<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:** [October 25, 2024, 5:27pm UTC](https://discuss.elastic.co/t/how-does-elasticsearch-propagate-index-mappings-to-all-primary-and-replica-shards/369432/2 "2024-10-25T17:27:25Z")

</div>

1. Yes.
2. Same way, mapping updates are the master's job.
3. No.
