Skip to content

Commit 76e2e1a

Browse files
committed
Merge remote-tracking branch 'upstream/main' into shard_bulk_inference_filter_memory
2 parents 6cb165b + 74bb0f9 commit 76e2e1a

File tree

59 files changed

+264
-246
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+264
-246
lines changed

docs/changelog/123890.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 123890
2+
summary: Do not let `ShardBulkInferenceActionFilter` unwrap / rewrap ESExceptions
3+
area: Search
4+
type: bug
5+
issues: []

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
}

modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/RepositoryCredentialsTests.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ public void testRepositoryCredentialsOverrideSecureCredentials() {
107107
assertThat(credentials.getAWSSecretKey(), is("insecure_aws_secret"));
108108

109109
assertCriticalWarnings(
110-
"[access_key] setting was deprecated in Elasticsearch and will be removed in a future release.",
111-
"[secret_key] setting was deprecated in Elasticsearch and will be removed in a future release.",
110+
"[access_key] setting was deprecated in Elasticsearch and will be removed in a future release. "
111+
+ "See the breaking changes documentation for the next major version.",
112+
"[secret_key] setting was deprecated in Elasticsearch and will be removed in a future release. "
113+
+ "See the breaking changes documentation for the next major version.",
112114
S3Repository.INSECURE_CREDENTIALS_DEPRECATION_WARNING
113115
);
114116
}
@@ -193,8 +195,10 @@ public void testReinitSecureCredentials() {
193195

194196
if (hasInsecureSettings) {
195197
assertCriticalWarnings(
196-
"[access_key] setting was deprecated in Elasticsearch and will be removed in a future release.",
197-
"[secret_key] setting was deprecated in Elasticsearch and will be removed in a future release.",
198+
"[access_key] setting was deprecated in Elasticsearch and will be removed in a future release. "
199+
+ "See the breaking changes documentation for the next major version.",
200+
"[secret_key] setting was deprecated in Elasticsearch and will be removed in a future release. "
201+
+ "See the breaking changes documentation for the next major version.",
198202
S3Repository.INSECURE_CREDENTIALS_DEPRECATION_WARNING
199203
);
200204
}

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);

0 commit comments

Comments
 (0)