diff --git a/CHANGELOG.md b/CHANGELOG.md index 340360f9cdd28..464fcf2cadd3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -113,6 +113,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Detect breaking changes on pull requests ([#9044](https://github.com/opensearch-project/OpenSearch/pull/9044)) - Add cluster primary balance contraint for rebalancing with buffer ([#12656](https://github.com/opensearch-project/OpenSearch/pull/12656)) - [Remote Store] Make translog transfer timeout configurable ([#12704](https://github.com/opensearch-project/OpenSearch/pull/12704)) +- [Remote Store] Reallow index & cluster default Refresh Interval to be set as -1 ([#12992](https://github.com/opensearch-project/OpenSearch/pull/12992)) ### Dependencies - Bump `org.apache.commons:commons-configuration2` from 2.10.0 to 2.10.1 ([#12896](https://github.com/opensearch-project/OpenSearch/pull/12896)) diff --git a/server/src/main/java/org/opensearch/index/shard/IndexShard.java b/server/src/main/java/org/opensearch/index/shard/IndexShard.java index 4882539510f26..072faf7ae4053 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShard.java @@ -4485,8 +4485,8 @@ public Durability getTranslogDurability() { private final AtomicBoolean flushOrRollRunning = new AtomicBoolean(); /** - * Tests whether or not the shard should be Refreshed, if number of translog files breaches the - * threshold count determined by {@code index.translog.max_uncommitted_files_threshold} + * Checks if the shard need to be Refreshed depending on Translog constraints. + * Each Translog type can have it's own decider * @return {@code true} if the shard should be Refreshed */ public boolean shouldRefreshShard() { diff --git a/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java b/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java index 4f38363d6a353..025751e18d71e 100644 --- a/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java +++ b/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java @@ -654,9 +654,9 @@ int availablePermits() { } /** - * Tests whether or not the shard should be Refreshed. - * This test is based on the number of Translog files compared to configured number of Translog files threshold - * + * Checks whether or not the shard should be Refreshed. + * This checks if number of translog files breaches the threshold count determined by + * {@code cluster.remote_store.max_referenced_translog_files} setting * @return {@code true} if the shard should be Refreshed */ @Override