Skip to content

Commit

Permalink
Adding Default Implementation for getLatestSegmentInfos() in Engine.j…
Browse files Browse the repository at this point in the history
…ava and adressing comments from previous PR

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
  • Loading branch information
Rishikesh1159 committed Jul 25, 2022
1 parent d28778e commit 2bc5652
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
5 changes: 4 additions & 1 deletion server/src/main/java/org/opensearch/index/engine/Engine.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2bc5652

Please sign in to comment.