Skip to content

Commit 0ab1ee6

Browse files
authored
Merge branch 'main' into shard_bulk_inference_filter_memory
2 parents 14bb46d + 0dda109 commit 0ab1ee6

File tree

21 files changed

+46
-127
lines changed

21 files changed

+46
-127
lines changed

libs/entitlement/bridge/src/main/java/org/elasticsearch/entitlement/bridge/EntitlementChecker.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -518,10 +518,7 @@ public interface EntitlementChecker {
518518
Class<?>[] classes
519519
);
520520

521-
void check$sun_net_www_protocol_https_AbstractDelegateHttpsURLConnection$connect(
522-
Class<?> callerClass,
523-
javax.net.ssl.HttpsURLConnection that
524-
);
521+
void check$sun_net_www_protocol_https_AbstractDelegateHttpsURLConnection$connect(Class<?> callerClass, java.net.HttpURLConnection that);
525522

526523
void check$sun_net_www_protocol_mailto_MailToURLConnection$connect(Class<?> callerClass, java.net.URLConnection that);
527524

libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/api/ElasticsearchEntitlementChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ private static boolean isFileUrlConnection(java.net.URLConnection urlConnection)
11801180
@Override
11811181
public void check$sun_net_www_protocol_https_AbstractDelegateHttpsURLConnection$connect(
11821182
Class<?> callerClass,
1183-
javax.net.ssl.HttpsURLConnection that
1183+
java.net.HttpURLConnection that
11841184
) {
11851185
policyManager.checkOutboundNetworkAccess(callerClass);
11861186
}

muted-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ tests:
345345
- class: org.elasticsearch.search.fieldcaps.FieldCapabilitiesIT
346346
method: testRelocation
347347
issue: https://github.com/elastic/elasticsearch/issues/124227
348+
- class: org.elasticsearch.smoketest.MlWithSecurityIT
349+
method: test {yaml=ml/3rd_party_deployment/Test start and stop multiple deployments}
350+
issue: https://github.com/elastic/elasticsearch/issues/124315
348351

349352
# Examples:
350353
#

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,7 @@ private enum ElasticsearchExceptionHandle {
18421842
org.elasticsearch.ElasticsearchAuthenticationProcessingError.class,
18431843
org.elasticsearch.ElasticsearchAuthenticationProcessingError::new,
18441844
162,
1845-
TransportVersions.V_7_16_0
1845+
UNKNOWN_VERSION_ADDED
18461846
),
18471847
REPOSITORY_CONFLICT_EXCEPTION(
18481848
org.elasticsearch.repositories.RepositoryConflictException.class,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ static TransportVersion def(int id) {
6262
public static final TransportVersion V_7_10_0 = def(7_10_00_99);
6363
public static final TransportVersion V_7_15_0 = def(7_15_00_99);
6464
public static final TransportVersion V_7_15_1 = def(7_15_01_99);
65-
public static final TransportVersion V_7_16_0 = def(7_16_00_99);
6665
public static final TransportVersion V_7_17_0 = def(7_17_00_99);
6766
public static final TransportVersion V_7_17_1 = def(7_17_01_99);
6867
public static final TransportVersion V_7_17_8 = def(7_17_08_99);

server/src/main/java/org/elasticsearch/cluster/metadata/ShutdownShardMigrationStatus.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
package org.elasticsearch.cluster.metadata;
1111

12-
import org.elasticsearch.TransportVersion;
1312
import org.elasticsearch.TransportVersions;
1413
import org.elasticsearch.cluster.routing.allocation.ShardAllocationDecision;
1514
import org.elasticsearch.common.Strings;
@@ -33,7 +32,6 @@
3332
import static org.elasticsearch.common.xcontent.ChunkedToXContentHelper.startObject;
3433

3534
public class ShutdownShardMigrationStatus implements Writeable, ChunkedToXContentObject {
36-
private static final TransportVersion ALLOCATION_DECISION_ADDED_VERSION = TransportVersions.V_7_16_0;
3735

3836
public static final String NODE_ALLOCATION_DECISION_KEY = "node_allocation_decision";
3937

@@ -142,11 +140,7 @@ public ShutdownShardMigrationStatus(StreamInput in) throws IOException {
142140
this.shardsRemaining = in.readLong();
143141
}
144142
this.explanation = in.readOptionalString();
145-
if (in.getTransportVersion().onOrAfter(ALLOCATION_DECISION_ADDED_VERSION)) {
146-
this.allocationDecision = in.readOptionalWriteable(ShardAllocationDecision::new);
147-
} else {
148-
this.allocationDecision = null;
149-
}
143+
this.allocationDecision = in.readOptionalWriteable(ShardAllocationDecision::new);
150144
}
151145

152146
public long getShardsRemaining() {
@@ -203,9 +197,7 @@ public void writeTo(StreamOutput out) throws IOException {
203197
out.writeLong(shardsRemaining);
204198
}
205199
out.writeOptionalString(explanation);
206-
if (out.getTransportVersion().onOrAfter(ALLOCATION_DECISION_ADDED_VERSION)) {
207-
out.writeOptionalWriteable(allocationDecision);
208-
}
200+
out.writeOptionalWriteable(allocationDecision);
209201
}
210202

211203
@Override

server/src/main/java/org/elasticsearch/cluster/metadata/SingleNodeShutdownMetadata.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
*/
3737
public class SingleNodeShutdownMetadata implements SimpleDiffable<SingleNodeShutdownMetadata>, ToXContentObject {
3838

39-
public static final TransportVersion REPLACE_SHUTDOWN_TYPE_ADDED_VERSION = TransportVersions.V_7_16_0;
4039
public static final TransportVersion SIGTERM_ADDED_VERSION = TransportVersions.V_8_9_X;
4140
public static final TransportVersion GRACE_PERIOD_ADDED_VERSION = TransportVersions.V_8_9_X;
4241

@@ -180,11 +179,7 @@ public SingleNodeShutdownMetadata(StreamInput in) throws IOException {
180179
this.startedAtMillis = in.readVLong();
181180
this.nodeSeen = in.readBoolean();
182181
this.allocationDelay = in.readOptionalTimeValue();
183-
if (in.getTransportVersion().onOrAfter(REPLACE_SHUTDOWN_TYPE_ADDED_VERSION)) {
184-
this.targetNodeName = in.readOptionalString();
185-
} else {
186-
this.targetNodeName = null;
187-
}
182+
this.targetNodeName = in.readOptionalString();
188183
if (in.getTransportVersion().onOrAfter(GRACE_PERIOD_ADDED_VERSION)) {
189184
this.gracePeriod = in.readOptionalTimeValue();
190185
} else {
@@ -271,8 +266,7 @@ public void writeTo(StreamOutput out) throws IOException {
271266
if (out.getTransportVersion().onOrAfter(NODE_SHUTDOWN_EPHEMERAL_ID_ADDED)) {
272267
out.writeOptionalString(nodeEphemeralId);
273268
}
274-
if ((out.getTransportVersion().before(REPLACE_SHUTDOWN_TYPE_ADDED_VERSION) && this.type == SingleNodeShutdownMetadata.Type.REPLACE)
275-
|| (out.getTransportVersion().before(SIGTERM_ADDED_VERSION) && this.type == Type.SIGTERM)) {
269+
if (out.getTransportVersion().before(SIGTERM_ADDED_VERSION) && this.type == Type.SIGTERM) {
276270
out.writeEnum(SingleNodeShutdownMetadata.Type.REMOVE);
277271
} else {
278272
out.writeEnum(type);
@@ -281,9 +275,7 @@ public void writeTo(StreamOutput out) throws IOException {
281275
out.writeVLong(startedAtMillis);
282276
out.writeBoolean(nodeSeen);
283277
out.writeOptionalTimeValue(allocationDelay);
284-
if (out.getTransportVersion().onOrAfter(REPLACE_SHUTDOWN_TYPE_ADDED_VERSION)) {
285-
out.writeOptionalString(targetNodeName);
286-
}
278+
out.writeOptionalString(targetNodeName);
287279
if (out.getTransportVersion().onOrAfter(GRACE_PERIOD_ADDED_VERSION)) {
288280
out.writeOptionalTimeValue(gracePeriod);
289281
}

server/src/main/java/org/elasticsearch/cluster/service/ClusterStateUpdateStats.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
package org.elasticsearch.cluster.service;
1111

12-
import org.elasticsearch.TransportVersions;
1312
import org.elasticsearch.common.io.stream.StreamInput;
1413
import org.elasticsearch.common.io.stream.StreamOutput;
1514
import org.elasticsearch.common.io.stream.Writeable;
@@ -118,7 +117,6 @@ public ClusterStateUpdateStats(StreamInput in) throws IOException {
118117

119118
@Override
120119
public void writeTo(StreamOutput out) throws IOException {
121-
assert out.getTransportVersion().onOrAfter(TransportVersions.V_7_16_0) : out.getTransportVersion();
122120
out.writeVLong(unchangedTaskCount);
123121
out.writeVLong(publicationSuccessCount);
124122
out.writeVLong(publicationFailureCount);

server/src/main/java/org/elasticsearch/common/document/DocumentField.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ public class DocumentField implements Writeable, Iterable<Object> {
4545
public DocumentField(StreamInput in) throws IOException {
4646
name = in.readString();
4747
values = in.readCollectionAsList(StreamInput::readGenericValue);
48-
if (in.getTransportVersion().onOrAfter(TransportVersions.V_7_16_0)) {
49-
ignoredValues = in.readCollectionAsList(StreamInput::readGenericValue);
50-
} else {
51-
ignoredValues = Collections.emptyList();
52-
}
48+
ignoredValues = in.readCollectionAsList(StreamInput::readGenericValue);
5349
if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_2_0)) {
5450
lookupFields = in.readCollectionAsList(LookupField::new);
5551
} else {
@@ -115,9 +111,7 @@ public List<Object> getIgnoredValues() {
115111
public void writeTo(StreamOutput out) throws IOException {
116112
out.writeString(name);
117113
out.writeCollection(values, StreamOutput::writeGenericValue);
118-
if (out.getTransportVersion().onOrAfter(TransportVersions.V_7_16_0)) {
119-
out.writeCollection(ignoredValues, StreamOutput::writeGenericValue);
120-
}
114+
out.writeCollection(ignoredValues, StreamOutput::writeGenericValue);
121115
if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_2_0)) {
122116
out.writeCollection(lookupFields);
123117
} else {

server/src/main/java/org/elasticsearch/discovery/DiscoveryStats.java

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
package org.elasticsearch.discovery;
1111

12-
import org.elasticsearch.TransportVersions;
1312
import org.elasticsearch.cluster.coordination.PendingClusterStateStats;
1413
import org.elasticsearch.cluster.coordination.PublishClusterStateStats;
1514
import org.elasticsearch.cluster.service.ClusterApplierRecordingService;
@@ -44,28 +43,16 @@ public DiscoveryStats(
4443
public DiscoveryStats(StreamInput in) throws IOException {
4544
queueStats = in.readOptionalWriteable(PendingClusterStateStats::new);
4645
publishStats = in.readOptionalWriteable(PublishClusterStateStats::new);
47-
if (in.getTransportVersion().onOrAfter(TransportVersions.V_7_16_0)) {
48-
clusterStateUpdateStats = in.readOptionalWriteable(ClusterStateUpdateStats::new);
49-
} else {
50-
clusterStateUpdateStats = null;
51-
}
52-
if (in.getTransportVersion().onOrAfter(TransportVersions.V_7_16_0)) {
53-
applierRecordingStats = in.readOptionalWriteable(ClusterApplierRecordingService.Stats::new);
54-
} else {
55-
applierRecordingStats = null;
56-
}
46+
clusterStateUpdateStats = in.readOptionalWriteable(ClusterStateUpdateStats::new);
47+
applierRecordingStats = in.readOptionalWriteable(ClusterApplierRecordingService.Stats::new);
5748
}
5849

5950
@Override
6051
public void writeTo(StreamOutput out) throws IOException {
6152
out.writeOptionalWriteable(queueStats);
6253
out.writeOptionalWriteable(publishStats);
63-
if (out.getTransportVersion().onOrAfter(TransportVersions.V_7_16_0)) {
64-
out.writeOptionalWriteable(clusterStateUpdateStats);
65-
}
66-
if (out.getTransportVersion().onOrAfter(TransportVersions.V_7_16_0)) {
67-
out.writeOptionalWriteable(applierRecordingStats);
68-
}
54+
out.writeOptionalWriteable(clusterStateUpdateStats);
55+
out.writeOptionalWriteable(applierRecordingStats);
6956
}
7057

7158
@Override

0 commit comments

Comments
 (0)