Skip to content

Commit 0700ff7

Browse files
authored
Remove deprecated Engine#newChangesSnapshot (#118426)
The new method with the overloaded chunk size should be used instead. Relates #114618
1 parent a7fdc10 commit 0700ff7

File tree

3 files changed

+2
-43
lines changed

3 files changed

+2
-43
lines changed

server/src/main/java/org/elasticsearch/index/engine/Engine.java

+2-19
Original file line numberDiff line numberDiff line change
@@ -941,36 +941,19 @@ public boolean allowSearchIdleOptimization() {
941941
*/
942942
public abstract int countChanges(String source, long fromSeqNo, long toSeqNo) throws IOException;
943943

944-
/**
945-
* @deprecated This method is deprecated will and be removed once #114618 is applied to the serverless repository.
946-
* @see #newChangesSnapshot(String, long, long, boolean, boolean, boolean, long)
947-
*/
948-
@Deprecated
949-
public abstract Translog.Snapshot newChangesSnapshot(
950-
String source,
951-
long fromSeqNo,
952-
long toSeqNo,
953-
boolean requiredFullRange,
954-
boolean singleConsumer,
955-
boolean accessStats
956-
) throws IOException;
957-
958944
/**
959945
* Creates a new history snapshot from Lucene for reading operations whose seqno in the requesting seqno range (both inclusive).
960946
* This feature requires soft-deletes enabled. If soft-deletes are disabled, this method will throw an {@link IllegalStateException}.
961947
*/
962-
public Translog.Snapshot newChangesSnapshot(
948+
public abstract Translog.Snapshot newChangesSnapshot(
963949
String source,
964950
long fromSeqNo,
965951
long toSeqNo,
966952
boolean requiredFullRange,
967953
boolean singleConsumer,
968954
boolean accessStats,
969955
long maxChunkSize
970-
) throws IOException {
971-
// TODO: Remove this default implementation once the deprecated newChangesSnapshot is removed
972-
return newChangesSnapshot(source, fromSeqNo, toSeqNo, requiredFullRange, singleConsumer, accessStats);
973-
}
956+
) throws IOException;
974957

975958
/**
976959
* Checks if this engine has every operations since {@code startingSeqNo}(inclusive) in its history (either Lucene or translog)

server/src/main/java/org/elasticsearch/index/engine/InternalEngine.java

-12
Original file line numberDiff line numberDiff line change
@@ -3136,18 +3136,6 @@ public int countChanges(String source, long fromSeqNo, long toSeqNo) throws IOEx
31363136
}
31373137
}
31383138

3139-
@Override
3140-
public Translog.Snapshot newChangesSnapshot(
3141-
String source,
3142-
long fromSeqNo,
3143-
long toSeqNo,
3144-
boolean requiredFullRange,
3145-
boolean singleConsumer,
3146-
boolean accessStats
3147-
) throws IOException {
3148-
return newChangesSnapshot(source, fromSeqNo, toSeqNo, requiredFullRange, singleConsumer, accessStats, -1);
3149-
}
3150-
31513139
@Override
31523140
public Translog.Snapshot newChangesSnapshot(
31533141
String source,

server/src/main/java/org/elasticsearch/index/engine/ReadOnlyEngine.java

-12
Original file line numberDiff line numberDiff line change
@@ -361,18 +361,6 @@ public int countChanges(String source, long fromSeqNo, long toSeqNo) throws IOEx
361361
}
362362
}
363363

364-
@Override
365-
public Translog.Snapshot newChangesSnapshot(
366-
String source,
367-
long fromSeqNo,
368-
long toSeqNo,
369-
boolean requiredFullRange,
370-
boolean singleConsumer,
371-
boolean accessStats
372-
) throws IOException {
373-
return Translog.Snapshot.EMPTY;
374-
}
375-
376364
@Override
377365
public Translog.Snapshot newChangesSnapshot(
378366
String source,

0 commit comments

Comments
 (0)