From 86d3f679b5460b95f898c85174e6a22d8a547221 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 21:20:22 +0530 Subject: [PATCH] Ignoring update of final type settings in updateSettings function (#1304) (#1306) Signed-off-by: Nishant Goel (cherry picked from commit e509da4dcced4842c556d7166ebc778af697c6cb) Co-authored-by: Nishant Goel <113011736+nisgoel-amazon@users.noreply.github.com> --- .../replication/task/index/IndexReplicationTask.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt index d0c812a7..48d0f331 100644 --- a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt +++ b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt @@ -461,7 +461,7 @@ open class IndexReplicationTask(id: Long, type: String, action: String, descript continue } val setting = indexScopedSettings[key] - if (!setting.isPrivateIndex) { + if (!setting.isPrivateIndex && !setting.isFinal) { desiredSettingsBuilder.copy(key, settings); } } @@ -473,7 +473,7 @@ open class IndexReplicationTask(id: Long, type: String, action: String, descript if (desiredSettings.get(key) != followerSettings.get(key)) { //Not intended setting on follower side. val setting = indexScopedSettings[key] - if (indexScopedSettings.isPrivateSetting(key)) { + if (indexScopedSettings.isPrivateSetting(key) || setting.isFinal) { continue } if (!setting.isDynamic()) { @@ -486,7 +486,7 @@ open class IndexReplicationTask(id: Long, type: String, action: String, descript for (key in followerSettings.keySet()) { val setting = indexScopedSettings[key] - if (setting == null || setting.isPrivateIndex) { + if (setting == null || setting.isPrivateIndex || setting.isFinal) { continue }