You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updating an index mapping on the cluster leader does not get replicated in many circumstances.
The cluster replication plugin periodically checks for index mapping updates but only applies them if an already existing property mapping known to the follower gets modified.
for((key,value) in followerProperties?: emptyMap()) {
This breaks index mapping updates that only add mappings for new properties or modify dynamic mappings. If an existing property mapping gets modified however the replication will apply the entire mappings - including dynamic mappings.
Possible workaround: Modify also an existing property mapping, e.g. add a meta field to the property mapping.
How can one reproduce the bug?
Steps to reproduce the behavior:
Create an index with at least one property mapping on the cluster leader.
Enable the cluster replication and wait until the index gets replicated to the follower.
Add new property to the index mappings on the cluster leader.
Wait and see that nothing gets replicated.
Modify the existing property from step 1 by adding a "meta": {"force": "true"}
Wait and see that the mapping gets replicated.
What is the expected behavior?
Any index mapping update on the cluster leader should get replicated with no workarounds required.
What is your host/environment?
OS: 2.11 and 2.13
Do you have any screenshots?
N/A
Do you have any additional context?
N/A
The text was updated successfully, but these errors were encountered:
What is the bug?
Updating an index mapping on the cluster leader does not get replicated in many circumstances.
The cluster replication plugin periodically checks for index mapping updates but only applies them if an already existing property mapping known to the follower gets modified.
Code reference:
cross-cluster-replication/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt
Line 576 in 2e04b0e
This breaks index mapping updates that only add mappings for new properties or modify dynamic mappings. If an existing property mapping gets modified however the replication will apply the entire mappings - including dynamic mappings.
Possible workaround: Modify also an existing property mapping, e.g. add a
meta
field to the property mapping.How can one reproduce the bug?
Steps to reproduce the behavior:
"meta": {"force": "true"}
What is the expected behavior?
Any index mapping update on the cluster leader should get replicated with no workarounds required.
What is your host/environment?
Do you have any screenshots?
N/A
Do you have any additional context?
N/A
The text was updated successfully, but these errors were encountered: