Skip to content

Commit 03ba800

Browse files
Merge branch 'main' into indexLikeBackport_9_20
2 parents e7ba191 + b52c6f7 commit 03ba800

File tree

67 files changed

+1290
-172
lines changed

Some content is hidden

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

67 files changed

+1290
-172
lines changed
Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
package org.elasticsearch.benchmark.compute.operator;
10+
package org.elasticsearch.benchmark._nightly.esql;
1111

1212
import org.apache.lucene.document.FieldType;
1313
import org.apache.lucene.document.NumericDocValuesField;
@@ -85,10 +85,18 @@
8585
@State(Scope.Thread)
8686
@Fork(1)
8787
public class ValuesSourceReaderBenchmark {
88+
private static final String[] SUPPORTED_LAYOUTS = new String[] { "in_order", "shuffled", "shuffled_singles" };
89+
private static final String[] SUPPORTED_NAMES = new String[] {
90+
"long",
91+
"int",
92+
"double",
93+
"keyword",
94+
"stored_keyword",
95+
"3_stored_keywords" };
96+
8897
private static final int BLOCK_LENGTH = 16 * 1024;
8998
private static final int INDEX_SIZE = 10 * BLOCK_LENGTH;
9099
private static final int COMMIT_INTERVAL = 500;
91-
private static final BigArrays BIG_ARRAYS = BigArrays.NON_RECYCLING_INSTANCE;
92100
private static final BlockFactory blockFactory = BlockFactory.getInstance(
93101
new NoopCircuitBreaker("noop"),
94102
BigArrays.NON_RECYCLING_INSTANCE
@@ -104,8 +112,8 @@ static void selfTest() {
104112
ValuesSourceReaderBenchmark benchmark = new ValuesSourceReaderBenchmark();
105113
benchmark.setupIndex();
106114
try {
107-
for (String layout : ValuesSourceReaderBenchmark.class.getField("layout").getAnnotationsByType(Param.class)[0].value()) {
108-
for (String name : ValuesSourceReaderBenchmark.class.getField("name").getAnnotationsByType(Param.class)[0].value()) {
115+
for (String layout : ValuesSourceReaderBenchmark.SUPPORTED_LAYOUTS) {
116+
for (String name : ValuesSourceReaderBenchmark.SUPPORTED_NAMES) {
109117
benchmark.layout = layout;
110118
benchmark.name = name;
111119
try {
@@ -119,7 +127,7 @@ static void selfTest() {
119127
} finally {
120128
benchmark.teardownIndex();
121129
}
122-
} catch (IOException | NoSuchFieldException e) {
130+
} catch (IOException e) {
123131
throw new AssertionError(e);
124132
}
125133
}
@@ -321,10 +329,10 @@ public FieldNamesFieldMapper.FieldNamesFieldType fieldNames() {
321329
* each page has a single document rather than {@code BLOCK_SIZE} docs.</li>
322330
* </ul>
323331
*/
324-
@Param({ "in_order", "shuffled", "shuffled_singles" })
332+
@Param({ "in_order", "shuffled" })
325333
public String layout;
326334

327-
@Param({ "long", "int", "double", "keyword", "stored_keyword", "3_stored_keywords" })
335+
@Param({ "long", "keyword", "stored_keyword" })
328336
public String name;
329337

330338
private Directory directory;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
package org.elasticsearch.benchmark.compute.operator;
10+
package org.elasticsearch.benchmark._nightly.esql;
1111

1212
import org.elasticsearch.test.ESTestCase;
1313

docs/changelog/130427.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
pr: 130427
2-
summary: Disallow brackets in unquoted index pattersn
2+
summary: Disallow brackets in unquoted index patterns
33
area: ES|QL
4-
type: bug
5-
issues: []
4+
type: breaking
5+
issues:
6+
- 130378
7+
breaking:
8+
title: Unquoted index patterns do not allow `(` and `)` characters
9+
area: ES|QL
10+
details: >-
11+
Previously, ES|QL accepted unquoted index patterns containing brackets, such as `FROM index(1) | ENRICH policy(2)`.
12+
13+
This query syntax is no longer valid because it could conflict with subquery syntax, where brackets are used as delimiters.
14+
15+
Brackets are now only allowed in quoted index patterns. For example: `FROM "index(1)" | ENRICH "policy(2)"`.
16+
impact: "This affects existing queries containing brackets in index or policy names, i.e. in FROM, ENRICH, and LOOKUP JOIN commands."
17+
notable: false

docs/changelog/130909.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 130909
2+
summary: Allow adjustment of transport TLS handshake timeout
3+
area: Network
4+
type: enhancement
5+
issues: []

docs/changelog/130914.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 130914
2+
summary: Fix LIMIT NPE with null value
3+
area: ES|QL
4+
type: bug
5+
issues:
6+
- 130908

docs/changelog/130939.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 130939
2+
summary: Expose HTTP connection metrics to telemetry
3+
area: Network
4+
type: enhancement
5+
issues: []

docs/reference/elasticsearch/configuration-reference/security-settings.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,6 +1933,8 @@ You can configure the following TLS/SSL settings.
19331933
`xpack.security.transport.ssl.trust_restrictions.x509_fields` ![logo cloud](https://doc-icons.s3.us-east-2.amazonaws.com/logo_cloud.svg "Supported on Elastic Cloud Hosted")
19341934
: Specifies which field(s) from the TLS certificate is used to match for the restricted trust management that is used for remote clusters connections. This should only be set when a self managed cluster can not create certificates that follow the Elastic Cloud pattern. The default value is ["subjectAltName.otherName.commonName"], the Elastic Cloud pattern. "subjectAltName.dnsName" is also supported and can be configured in addition to or in replacement of the default.
19351935

1936+
`xpack.security.transport.ssl.handshake_timeout`
1937+
: Specifies the timeout for a TLS handshake when opening a transport connection. Defaults to `10s`.
19361938

19371939
### Transport TLS/SSL key and trusted certificate settings [security-transport-tls-ssl-key-trusted-certificate-settings]
19381940

@@ -2131,6 +2133,9 @@ You can configure the following TLS/SSL settings.
21312133

21322134
For more information, see Oracle’s [Java Cryptography Architecture documentation](https://docs.oracle.com/en/java/javase/11/security/oracle-providers.md#GUID-7093246A-31A3-4304-AC5F-5FB6400405E2).
21332135

2136+
`xpack.security.remote_cluster_server.ssl.handshake_timeout`
2137+
: Specifies the timeout for a TLS handshake when handling an inbound remote-cluster connection. Defaults to `10s`.
2138+
21342139

21352140
### Remote cluster server (API key based model) TLS/SSL key and trusted certificate settings [security-remote-cluster-server-tls-ssl-key-trusted-certificate-settings]
21362141

@@ -2260,6 +2265,9 @@ You can configure the following TLS/SSL settings.
22602265

22612266
For more information, see Oracle’s [Java Cryptography Architecture documentation](https://docs.oracle.com/en/java/javase/11/security/oracle-providers.md#GUID-7093246A-31A3-4304-AC5F-5FB6400405E2).
22622267

2268+
`xpack.security.remote_cluster_client.ssl.handshake_timeout`
2269+
: Specifies the timeout for a TLS handshake when opening a remote-cluster connection. Defaults to `10s`.
2270+
22632271

22642272
### Remote cluster client (API key based model) TLS/SSL key and trusted certificate settings [security-remote-cluster-client-tls-ssl-key-trusted-certificate-settings]
22652273

libs/ssl-config/src/main/java/org/elasticsearch/common/ssl/SslConfiguration.java

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public record SslConfiguration(
4040
SslVerificationMode verificationMode,
4141
SslClientAuthenticationMode clientAuth,
4242
List<String> ciphers,
43-
List<String> supportedProtocols
43+
List<String> supportedProtocols,
44+
long handshakeTimeoutMillis
4445
) {
4546

4647
/**
@@ -71,7 +72,8 @@ public SslConfiguration(
7172
SslVerificationMode verificationMode,
7273
SslClientAuthenticationMode clientAuth,
7374
List<String> ciphers,
74-
List<String> supportedProtocols
75+
List<String> supportedProtocols,
76+
long handshakeTimeoutMillis
7577
) {
7678
this.settingPrefix = settingPrefix;
7779
this.explicitlyConfigured = explicitlyConfigured;
@@ -85,6 +87,10 @@ public SslConfiguration(
8587
this.keyConfig = Objects.requireNonNull(keyConfig, "key config cannot be null");
8688
this.verificationMode = Objects.requireNonNull(verificationMode, "verification mode cannot be null");
8789
this.clientAuth = Objects.requireNonNull(clientAuth, "client authentication cannot be null");
90+
if (handshakeTimeoutMillis < 1L) {
91+
throw new SslConfigException("handshake timeout must be at least 1ms");
92+
}
93+
this.handshakeTimeoutMillis = handshakeTimeoutMillis;
8894
this.ciphers = Collections.unmodifiableList(ciphers);
8995
this.supportedProtocols = Collections.unmodifiableList(supportedProtocols);
9096
}
@@ -164,11 +170,21 @@ public boolean equals(Object o) {
164170
&& this.verificationMode == that.verificationMode
165171
&& this.clientAuth == that.clientAuth
166172
&& Objects.equals(this.ciphers, that.ciphers)
167-
&& Objects.equals(this.supportedProtocols, that.supportedProtocols);
173+
&& Objects.equals(this.supportedProtocols, that.supportedProtocols)
174+
&& this.handshakeTimeoutMillis == that.handshakeTimeoutMillis;
168175
}
169176

170177
@Override
171178
public int hashCode() {
172-
return Objects.hash(settingPrefix, trustConfig, keyConfig, verificationMode, clientAuth, ciphers, supportedProtocols);
179+
return Objects.hash(
180+
settingPrefix,
181+
trustConfig,
182+
keyConfig,
183+
verificationMode,
184+
clientAuth,
185+
ciphers,
186+
supportedProtocols,
187+
handshakeTimeoutMillis
188+
);
173189
}
174190
}

libs/ssl-config/src/main/java/org/elasticsearch/common/ssl/SslConfigurationKeys.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ public class SslConfigurationKeys {
132132
* The use of this setting {@link #isDeprecated(String) is deprecated}.
133133
*/
134134
public static final String KEY_LEGACY_PASSPHRASE = "key_passphrase";
135+
/**
136+
* The timeout for TLS handshakes in this context.
137+
*/
138+
public static final String HANDSHAKE_TIMEOUT = "handshake_timeout";
135139

136140
private static final Set<String> DEPRECATED_KEYS = new HashSet<>(
137141
Arrays.asList(TRUSTSTORE_LEGACY_PASSWORD, KEYSTORE_LEGACY_PASSWORD, KEYSTORE_LEGACY_KEY_PASSWORD, KEY_LEGACY_PASSPHRASE)

libs/ssl-config/src/main/java/org/elasticsearch/common/ssl/SslConfigurationLoader.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
package org.elasticsearch.common.ssl;
1111

1212
import org.elasticsearch.core.Nullable;
13+
import org.elasticsearch.core.TimeValue;
1314

1415
import java.nio.file.Path;
1516
import java.security.KeyStore;
@@ -27,6 +28,7 @@
2728
import static org.elasticsearch.common.ssl.SslConfigurationKeys.CERTIFICATE_AUTHORITIES;
2829
import static org.elasticsearch.common.ssl.SslConfigurationKeys.CIPHERS;
2930
import static org.elasticsearch.common.ssl.SslConfigurationKeys.CLIENT_AUTH;
31+
import static org.elasticsearch.common.ssl.SslConfigurationKeys.HANDSHAKE_TIMEOUT;
3032
import static org.elasticsearch.common.ssl.SslConfigurationKeys.KEY;
3133
import static org.elasticsearch.common.ssl.SslConfigurationKeys.KEYSTORE_ALGORITHM;
3234
import static org.elasticsearch.common.ssl.SslConfigurationKeys.KEYSTORE_LEGACY_KEY_PASSWORD;
@@ -152,6 +154,8 @@ public abstract class SslConfigurationLoader {
152154
private static final char[] EMPTY_PASSWORD = new char[0];
153155
public static final List<X509Field> GLOBAL_DEFAULT_RESTRICTED_TRUST_FIELDS = List.of(X509Field.SAN_OTHERNAME_COMMONNAME);
154156

157+
public static final TimeValue DEFAULT_HANDSHAKE_TIMEOUT = TimeValue.timeValueSeconds(10);
158+
155159
private final String settingPrefix;
156160

157161
private SslTrustConfig defaultTrustConfig;
@@ -302,6 +306,11 @@ public SslConfiguration load(Path basePath) {
302306
X509Field::parseForRestrictedTrust,
303307
defaultRestrictedTrustFields
304308
);
309+
final long handshakeTimeoutMillis = resolveSetting(
310+
HANDSHAKE_TIMEOUT,
311+
s -> TimeValue.parseTimeValue(s, HANDSHAKE_TIMEOUT),
312+
DEFAULT_HANDSHAKE_TIMEOUT
313+
).millis();
305314

306315
final SslKeyConfig keyConfig = buildKeyConfig(basePath);
307316
final SslTrustConfig trustConfig = buildTrustConfig(basePath, verificationMode, keyConfig, Set.copyOf(trustRestrictionsX509Fields));
@@ -321,7 +330,8 @@ public SslConfiguration load(Path basePath) {
321330
verificationMode,
322331
clientAuth,
323332
ciphers,
324-
protocols
333+
protocols,
334+
handshakeTimeoutMillis
325335
);
326336
}
327337

0 commit comments

Comments
 (0)