Skip to content

Replicate aliases from leader to follower #41396

@jasontedor

Description

@jasontedor

CCR deliberately does not apply index templates to follower indices. This is to prevent situations where metadata in the index template could conflict with replication. For example, the number of shards between the leader and the follower must be aligned, so that means that we could never apply the number of shards from an index templates. Similarly for mappings and some settings. Consequently, it was a deliberate design decision that we do not apply index templates to follower indices. One downside of this though is that it means that index aliases need to be applied manually, instead of being picked up from index templates as follower indices are created. However, we could replicate index aliases (including updates) to followers from leaders.

Doing this requires three steps:

  • add aliases version to index metadata (so that we can easily track when alias metadata changes) Introduce aliases version #41397
  • use aliases versions to replicate index aliases to the follower from the leader Replicate aliases in cross-cluster replication #41815
  • reject manually adding aliases to followers? this is very likely the right thing to do otherwise we would have to have a way to distinguish user-added aliases from replicated aliases for the purposes of knowing which are safe to remove when they are removed from the leader (or we have to replicate alias actions instead of the result, which brings with it a ton of issues, like needing a sequence ID on alias actions) Do not allow modify aliases on followers #43017

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions