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

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 and shard allocation, 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.

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