From bd480d1fabe5c0e3eac3de26a0aca59cc5b72cab Mon Sep 17 00:00:00 2001 From: Rabi Panda Date: Wed, 18 Jan 2023 23:33:14 +0000 Subject: [PATCH] Update Changelog Signed-off-by: Rabi Panda --- CHANGELOG.md | 1 + .../org/opensearch/snapshots/SearchableSnapshotIT.java | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f9075b6a4ed3..c5077b0cbd486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Add query for initialized extensions ([#5658](https://github.com/opensearch-project/OpenSearch/pull/5658)) - Revert 'Added jackson dependency to server' and change extension reading ([#5768](https://github.com/opensearch-project/OpenSearch/pull/5768)) - Add support to disallow search request with preference parameter with strict weighted shard routing([#5874](https://github.com/opensearch-project/OpenSearch/pull/5874)) +- Add update settings allowlist for searchable snapshot ([#5907](https://github.com/opensearch-project/OpenSearch/pull/5907)) ### Dependencies - Bumps `log4j-core` from 2.18.0 to 2.19.0 diff --git a/server/src/internalClusterTest/java/org/opensearch/snapshots/SearchableSnapshotIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/SearchableSnapshotIT.java index f76a73bbbb9e5..85c291967c68c 100644 --- a/server/src/internalClusterTest/java/org/opensearch/snapshots/SearchableSnapshotIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/SearchableSnapshotIT.java @@ -216,8 +216,8 @@ public void testSearchableSnapshotIndexIsReadOnly() throws Exception { restoreSnapshotAndEnsureGreen(client, snapshotName, repoName); assertIndexingBlocked(restoredIndexName); - assertIndexSettingChangeBlocked(restoredIndexName); - assertAllowedIndexSettingUpdate(restoredIndexName); + assertUpdateIndexSettingsDefault(restoredIndexName); + assertUpdateIndexSettingsAllowList(restoredIndexName); assertTrue(client.admin().indices().prepareDelete(restoredIndexName).get().isAcknowledged()); assertThrows( "Expect index to not exist", @@ -328,7 +328,7 @@ private void assertIndexingBlocked(String index) { } } - private void assertIndexSettingChangeBlocked(String index) { + private void assertUpdateIndexSettingsDefault(String index) { try { final UpdateSettingsRequestBuilder builder = client().admin().indices().prepareUpdateSettings(index); builder.setSettings(Map.of("index.refresh_interval", 10)); @@ -339,7 +339,7 @@ private void assertIndexSettingChangeBlocked(String index) { } } - private void assertAllowedIndexSettingUpdate(String index) { + private void assertUpdateIndexSettingsAllowList(String index) { final UpdateSettingsRequestBuilder builder = client().admin().indices().prepareUpdateSettings(index); builder.setSettings(Map.of("index.max_result_window", 100)); AcknowledgedResponse settingsResponse = builder.execute().actionGet();