Skip to content

Commit

Permalink
Remove max limit from cluster.remote_store.index.segment_metadata.ret…
Browse files Browse the repository at this point in the history
…ention.max_count setting

Signed-off-by: Sachin Kale <kalsac@amazon.com>
  • Loading branch information
Sachin Kale committed Nov 27, 2023
1 parent 250fdcc commit 1a6cfad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ public class RecoverySettings {
"cluster.remote_store.index.segment_metadata.retention.max_count",
10,
-1,
100,
v -> {
if (v == 0) {
throw new IllegalArgumentException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void testSegmentMetadataRetention() {
);
assertEquals(-1, recoverySettings.getMinRemoteSegmentMetadataFiles());

// Setting value > default (10) and value < max (100)
// Setting value > default (10)
clusterSettings.applySettings(
Settings.builder().put(RecoverySettings.CLUSTER_REMOTE_INDEX_SEGMENT_METADATA_RETENTION_MAX_COUNT_SETTING.getKey(), 15).build()
);
Expand All @@ -140,16 +140,5 @@ public void testSegmentMetadataRetention() {
)
);
assertEquals(15, recoverySettings.getMinRemoteSegmentMetadataFiles());

// Setting value > 100 should fail and retain the existing value
assertThrows(
IllegalArgumentException.class,
() -> clusterSettings.applySettings(
Settings.builder()
.put(RecoverySettings.CLUSTER_REMOTE_INDEX_SEGMENT_METADATA_RETENTION_MAX_COUNT_SETTING.getKey(), 105)
.build()
)
);
assertEquals(15, recoverySettings.getMinRemoteSegmentMetadataFiles());
}
}

0 comments on commit 1a6cfad

Please sign in to comment.