Skip to content

Commit

Permalink
remove deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
jimczi committed Dec 11, 2024
1 parent 97d9dfa commit 23cbc3e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 43 deletions.
21 changes: 2 additions & 19 deletions server/src/main/java/org/elasticsearch/index/engine/Engine.java
Original file line number Diff line number Diff line change
Expand Up @@ -944,36 +944,19 @@ public boolean allowSearchIdleOptimization() {
*/
public abstract int countChanges(String source, long fromSeqNo, long toSeqNo) throws IOException;

/**
* @deprecated This method is deprecated will and be removed once #114618 is applied to the serverless repository.
* @see #newChangesSnapshot(String, long, long, boolean, boolean, boolean, long)
*/
@Deprecated
public abstract Translog.Snapshot newChangesSnapshot(
String source,
long fromSeqNo,
long toSeqNo,
boolean requiredFullRange,
boolean singleConsumer,
boolean accessStats
) throws IOException;

/**
* Creates a new history snapshot from Lucene for reading operations whose seqno in the requesting seqno range (both inclusive).
* This feature requires soft-deletes enabled. If soft-deletes are disabled, this method will throw an {@link IllegalStateException}.
*/
public Translog.Snapshot newChangesSnapshot(
public abstract Translog.Snapshot newChangesSnapshot(
String source,
long fromSeqNo,
long toSeqNo,
boolean requiredFullRange,
boolean singleConsumer,
boolean accessStats,
long maxChunkSize
) throws IOException {
// TODO: Remove this default implementation once the deprecated newChangesSnapshot is removed
return newChangesSnapshot(source, fromSeqNo, toSeqNo, requiredFullRange, singleConsumer, accessStats);
}
) throws IOException;

/**
* Checks if this engine has every operations since {@code startingSeqNo}(inclusive) in its history (either Lucene or translog)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3136,18 +3136,6 @@ public int countChanges(String source, long fromSeqNo, long toSeqNo) throws IOEx
}
}

@Override
public Translog.Snapshot newChangesSnapshot(
String source,
long fromSeqNo,
long toSeqNo,
boolean requiredFullRange,
boolean singleConsumer,
boolean accessStats
) throws IOException {
return newChangesSnapshot(source, fromSeqNo, toSeqNo, requiredFullRange, singleConsumer, accessStats, -1);
}

@Override
public Translog.Snapshot newChangesSnapshot(
String source,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,18 +361,6 @@ public int countChanges(String source, long fromSeqNo, long toSeqNo) throws IOEx
}
}

@Override
public Translog.Snapshot newChangesSnapshot(
String source,
long fromSeqNo,
long toSeqNo,
boolean requiredFullRange,
boolean singleConsumer,
boolean accessStats
) throws IOException {
return Translog.Snapshot.EMPTY;
}

@Override
public Translog.Snapshot newChangesSnapshot(
String source,
Expand Down

0 comments on commit 23cbc3e

Please sign in to comment.