Skip to content

Commit 2b61d11

Browse files
committed
fix oops
1 parent 45b79fa commit 2b61d11

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ static TransportVersion def(int id) {
178178
public static final TransportVersion TRANSPORT_STATS_HANDLING_TIME_REQUIRED_90 = def(9_000_0_02);
179179
public static final TransportVersion REMOVE_DESIRED_NODE_VERSION_90 = def(9_000_0_03);
180180
public static final TransportVersion ESQL_DRIVER_TASK_DESCRIPTION_90 = def(9_000_0_04);
181-
public static final TransportVersion ESQL_RETRY_ON_SHARD_LEVEL_FAILURE_90 = def(9_000_0_05);
182181
public static final TransportVersion COHERE_BIT_EMBEDDING_TYPE_SUPPORT_ADDED = def(9_001_0_00);
183182
public static final TransportVersion REMOVE_SNAPSHOT_FAILURES = def(9_002_0_00);
184183
public static final TransportVersion TRANSPORT_STATS_HANDLING_TIME_REQUIRED = def(9_003_0_00);

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/DataNodeComputeHandler.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,7 @@ public void messageReceived(DataNodeRequest request, TransportChannel channel, T
450450
request.runNodeLevelReduction()
451451
);
452452
// the sender doesn't support retry on shard failures, so we need to fail fast here.
453-
final boolean failFastOnShardFailures = channel.getVersion().before(TransportVersions.ESQL_RETRY_ON_SHARD_LEVEL_FAILURE) &&
454-
channel.getVersion().isPatchFrom(TransportVersions.ESQL_RETRY_ON_SHARD_LEVEL_FAILURE_90) == false;
453+
final boolean failFastOnShardFailures = channel.getVersion().before(TransportVersions.ESQL_RETRY_ON_SHARD_LEVEL_FAILURE);
455454
runComputeOnDataNode((CancellableTask) task, sessionId, reductionPlan, request, failFastOnShardFailures, listener);
456455
}
457456
}

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/DataNodeComputeResponse.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ final class DataNodeComputeResponse extends TransportResponse {
3232
}
3333

3434
DataNodeComputeResponse(StreamInput in) throws IOException {
35-
if (in.getTransportVersion().onOrAfter(TransportVersions.ESQL_RETRY_ON_SHARD_LEVEL_FAILURE) ||
36-
in.getTransportVersion().isPatchFrom(TransportVersions.ESQL_RETRY_ON_SHARD_LEVEL_FAILURE_90)) {
35+
if (in.getTransportVersion().onOrAfter(TransportVersions.ESQL_RETRY_ON_SHARD_LEVEL_FAILURE)) {
3736
this.profiles = in.readCollectionAsImmutableList(DriverProfile::new);
3837
this.shardLevelFailures = in.readMap(ShardId::new, StreamInput::readException);
3938
} else {
@@ -44,8 +43,7 @@ final class DataNodeComputeResponse extends TransportResponse {
4443

4544
@Override
4645
public void writeTo(StreamOutput out) throws IOException {
47-
if (out.getTransportVersion().onOrAfter(TransportVersions.ESQL_RETRY_ON_SHARD_LEVEL_FAILURE) ||
48-
out.getTransportVersion().isPatchFrom(TransportVersions.ESQL_RETRY_ON_SHARD_LEVEL_FAILURE_90)) {
46+
if (out.getTransportVersion().onOrAfter(TransportVersions.ESQL_RETRY_ON_SHARD_LEVEL_FAILURE)) {
4947
out.writeCollection(profiles, (o, v) -> v.writeTo(o));
5048
out.writeMap(shardLevelFailures, (o, v) -> v.writeTo(o), StreamOutput::writeException);
5149
} else {

0 commit comments

Comments
 (0)