Skip to content

Commit

Permalink
Add warning when updating search.idle.after with Segment Replication …
Browse files Browse the repository at this point in the history
…enabled.

Signed-off-by: Marc Handalian <handalm@amazon.com>
  • Loading branch information
mch2 committed Jun 20, 2023
1 parent 6ac635e commit 5a817b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/src/main/java/org/opensearch/index/IndexSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,9 @@ private void setSearchSegmentOrderReversed(boolean reversed) {
}

private void setSearchIdleAfter(TimeValue searchIdleAfter) {
if (this.replicationType == ReplicationType.SEGMENT && this.getNumberOfReplicas() > 0) {
logger.warn("Search idle is disabled for indices with replicas using the Segment Replication strategy");
}
this.searchIdleAfter = searchIdleAfter;
}

Expand Down

0 comments on commit 5a817b0

Please sign in to comment.