Skip to content

Commit 6faf095

Browse files
committed
Prepare for backport
1 parent e20b4aa commit 6faf095

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ static TransportVersion def(int id) {
210210
public static final TransportVersion ML_INFERENCE_COHERE_API_VERSION_8_19 = def(8_841_0_60);
211211
public static final TransportVersion ESQL_DOCUMENTS_FOUND_AND_VALUES_LOADED_8_19 = def(8_841_0_61);
212212
public static final TransportVersion ESQL_PROFILE_INCLUDE_PLAN_8_19 = def(8_841_0_62);
213+
public static final TransportVersion ESQL_SPLIT_ON_BIG_VALUES_8_19 = def(8_841_0_63);
213214
public static final TransportVersion V_9_0_0 = def(9_000_0_09);
214215
public static final TransportVersion INITIAL_ELASTICSEARCH_9_0_1 = def(9_000_0_10);
215216
public static final TransportVersion INITIAL_ELASTICSEARCH_9_0_2 = def(9_000_0_11);
@@ -326,6 +327,7 @@ static TransportVersion def(int id) {
326327
public static final TransportVersion ML_INFERENCE_COHERE_API_VERSION = def(9_110_0_00);
327328
public static final TransportVersion ESQL_PROFILE_INCLUDE_PLAN = def(9_111_0_00);
328329
public static final TransportVersion MAPPINGS_IN_DATA_STREAMS = def(9_112_0_00);
330+
public static final TransportVersion ESQL_SPLIT_ON_BIG_VALUES_9_1 = def(9_112_0_01);
329331
public static final TransportVersion PROJECT_STATE_REGISTRY_RECORDS_DELETIONS = def(9_113_0_00);
330332
public static final TransportVersion ESQL_SERIALIZE_TIMESERIES_FIELD_TYPE = def(9_114_0_00);
331333
public static final TransportVersion ML_INFERENCE_IBM_WATSONX_COMPLETION_ADDED = def(9_115_0_00);

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/lucene/read/ValuesSourceReaderOperatorStatus.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
import static org.elasticsearch.TransportVersions.ESQL_DOCUMENTS_FOUND_AND_VALUES_LOADED;
2525
import static org.elasticsearch.TransportVersions.ESQL_DOCUMENTS_FOUND_AND_VALUES_LOADED_8_19;
2626
import static org.elasticsearch.TransportVersions.ESQL_SPLIT_ON_BIG_VALUES;
27+
import static org.elasticsearch.TransportVersions.ESQL_SPLIT_ON_BIG_VALUES_8_19;
28+
import static org.elasticsearch.TransportVersions.ESQL_SPLIT_ON_BIG_VALUES_9_1;
2729

2830
public class ValuesSourceReaderOperatorStatus extends AbstractPageMappingToIteratorOperator.Status {
2931
public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(
@@ -55,7 +57,7 @@ static ValuesSourceReaderOperatorStatus readFrom(StreamInput in) throws IOExcept
5557
int pagesEmitted;
5658
long rowsReceived;
5759
long rowsEmitted;
58-
if (in.getTransportVersion().onOrAfter(ESQL_SPLIT_ON_BIG_VALUES)) {
60+
if (supportsSplitOnBigValues(in.getTransportVersion())) {
5961
AbstractPageMappingToIteratorOperator.Status status = new AbstractPageMappingToIteratorOperator.Status(in);
6062
processNanos = status.processNanos();
6163
pagesReceived = status.pagesReceived();
@@ -85,7 +87,7 @@ static ValuesSourceReaderOperatorStatus readFrom(StreamInput in) throws IOExcept
8587

8688
@Override
8789
public void writeTo(StreamOutput out) throws IOException {
88-
if (out.getTransportVersion().onOrAfter(ESQL_SPLIT_ON_BIG_VALUES)) {
90+
if (supportsSplitOnBigValues(out.getTransportVersion())) {
8991
super.writeTo(out);
9092
} else {
9193
/*
@@ -101,6 +103,12 @@ public void writeTo(StreamOutput out) throws IOException {
101103
}
102104
}
103105

106+
private static boolean supportsSplitOnBigValues(TransportVersion version) {
107+
return version.onOrAfter(ESQL_SPLIT_ON_BIG_VALUES)
108+
|| version.isPatchFrom(ESQL_SPLIT_ON_BIG_VALUES_9_1)
109+
|| version.isPatchFrom(ESQL_SPLIT_ON_BIG_VALUES_8_19);
110+
}
111+
104112
private static boolean supportsValuesLoaded(TransportVersion version) {
105113
return version.onOrAfter(ESQL_DOCUMENTS_FOUND_AND_VALUES_LOADED)
106114
|| version.isPatchFrom(ESQL_DOCUMENTS_FOUND_AND_VALUES_LOADED_8_19);

0 commit comments

Comments
 (0)