diff --git a/server/src/main/java/org/opensearch/index/engine/NRTReplicationReaderManager.java b/server/src/main/java/org/opensearch/index/engine/NRTReplicationReaderManager.java index d639ea854700e..9353750a6f111 100644 --- a/server/src/main/java/org/opensearch/index/engine/NRTReplicationReaderManager.java +++ b/server/src/main/java/org/opensearch/index/engine/NRTReplicationReaderManager.java @@ -53,12 +53,11 @@ public class NRTReplicationReaderManager extends OpenSearchReaderManager { OpenSearchDirectoryReader reader, Consumer> onNewReader, Consumer> onReaderClosed - ) throws IOException { + ) { super(reader); currentInfos = unwrapStandardReader(reader).getSegmentInfos(); this.onReaderClosed = onReaderClosed; this.onNewReader = onNewReader; - onNewReader.accept(currentInfos.files(true)); } @Override