diff --git a/server/src/main/java/org/opensearch/index/engine/Engine.java b/server/src/main/java/org/opensearch/index/engine/Engine.java index 9d940b84e621f..4b5fbd4ef84a6 100644 --- a/server/src/main/java/org/opensearch/index/engine/Engine.java +++ b/server/src/main/java/org/opensearch/index/engine/Engine.java @@ -173,7 +173,10 @@ public final EngineConfig config() { * Return the latest active SegmentInfos from the engine. * @return {@link SegmentInfos} */ - protected abstract SegmentInfos getLatestSegmentInfos(); + protected SegmentInfos getLatestSegmentInfos() { + // Default Implementation. + return null; + }; public MergeStats getMergeStats() { return new MergeStats(); diff --git a/server/src/main/java/org/opensearch/index/engine/NRTReplicationEngine.java b/server/src/main/java/org/opensearch/index/engine/NRTReplicationEngine.java index a5bd3122d52dd..14608ddc14c34 100644 --- a/server/src/main/java/org/opensearch/index/engine/NRTReplicationEngine.java +++ b/server/src/main/java/org/opensearch/index/engine/NRTReplicationEngine.java @@ -222,20 +222,7 @@ public Translog.Snapshot newChangesSnapshot( @Override public Translog.Snapshot newChangesSnapshotFromTranslogFile(String source, long fromSeqNo, long toSeqNo, boolean requiredFullRange) throws IOException { - return new Translog.Snapshot() { - @Override - public int totalOperations() { - return 0; - } - - @Override - public Translog.Operation next() { - return null; - } - - @Override - public void close() {} - }; + return getTranslog().newSnapshot(fromSeqNo, toSeqNo, requiredFullRange); } @Override