Skip to content

Commit e509da4

Browse files
Ignoring update of final type settings in updateSettings function (#1304)
Signed-off-by: Nishant Goel <[email protected]>
1 parent 494c26f commit e509da4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ open class IndexReplicationTask(id: Long, type: String, action: String, descript
461461
continue
462462
}
463463
val setting = indexScopedSettings[key]
464-
if (!setting.isPrivateIndex) {
464+
if (!setting.isPrivateIndex && !setting.isFinal) {
465465
desiredSettingsBuilder.copy(key, settings);
466466
}
467467
}
@@ -473,7 +473,7 @@ open class IndexReplicationTask(id: Long, type: String, action: String, descript
473473
if (desiredSettings.get(key) != followerSettings.get(key)) {
474474
//Not intended setting on follower side.
475475
val setting = indexScopedSettings[key]
476-
if (indexScopedSettings.isPrivateSetting(key)) {
476+
if (indexScopedSettings.isPrivateSetting(key) || setting.isFinal) {
477477
continue
478478
}
479479
if (!setting.isDynamic()) {
@@ -486,7 +486,7 @@ open class IndexReplicationTask(id: Long, type: String, action: String, descript
486486

487487
for (key in followerSettings.keySet()) {
488488
val setting = indexScopedSettings[key]
489-
if (setting == null || setting.isPrivateIndex) {
489+
if (setting == null || setting.isPrivateIndex || setting.isFinal) {
490490
continue
491491
}
492492

0 commit comments

Comments
 (0)