Skip to content

Commit 322d919

Browse files
committed
Merge branch 'main' of github.com:elastic/elasticsearch into IndexReshardingMetadata-OnTheWire
2 parents 15caadb + d387af8 commit 322d919

File tree

17 files changed

+180
-25
lines changed

17 files changed

+180
-25
lines changed

Could

Whitespace-only changes.

benchmarks/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ base {
2525
archivesName = 'elasticsearch-benchmarks'
2626
}
2727

28-
tasks.named("test").configure { enabled = false }
2928
tasks.named("javadoc").configure { enabled = false }
3029

3130
configurations {
@@ -52,8 +51,10 @@ dependencies {
5251
api "org.openjdk.jmh:jmh-core:$versions.jmh"
5352
annotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:$versions.jmh"
5453
// Dependencies of JMH
55-
runtimeOnly 'net.sf.jopt-simple:jopt-simple:5.0.4'
54+
runtimeOnly 'net.sf.jopt-simple:jopt-simple:5.0.2'
5655
runtimeOnly 'org.apache.commons:commons-math3:3.6.1'
56+
57+
testImplementation(project(':test:framework'))
5758
}
5859

5960
// enable the JMH's BenchmarkProcessor to generate the final benchmark classes

benchmarks/src/main/java/org/elasticsearch/benchmark/compute/operator/EvalBenchmark.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import org.apache.lucene.util.BytesRef;
1313
import org.elasticsearch.common.breaker.NoopCircuitBreaker;
14+
import org.elasticsearch.common.logging.LogConfigurator;
1415
import org.elasticsearch.common.settings.Settings;
1516
import org.elasticsearch.common.util.BigArrays;
1617
import org.elasticsearch.compute.data.Block;
@@ -28,6 +29,8 @@
2829
import org.elasticsearch.compute.operator.EvalOperator;
2930
import org.elasticsearch.compute.operator.Operator;
3031
import org.elasticsearch.core.TimeValue;
32+
import org.elasticsearch.logging.LogManager;
33+
import org.elasticsearch.logging.Logger;
3134
import org.elasticsearch.xpack.esql.core.expression.Expression;
3235
import org.elasticsearch.xpack.esql.core.expression.FieldAttribute;
3336
import org.elasticsearch.xpack.esql.core.expression.FoldContext;
@@ -89,9 +92,16 @@ public class EvalBenchmark {
8992
static final DriverContext driverContext = new DriverContext(BigArrays.NON_RECYCLING_INSTANCE, blockFactory);
9093

9194
static {
95+
LogConfigurator.configureESLogging();
9296
// Smoke test all the expected values and force loading subclasses more like prod
97+
selfTest();
98+
}
99+
100+
static void selfTest() {
101+
Logger log = LogManager.getLogger(EvalBenchmark.class);
93102
try {
94103
for (String operation : EvalBenchmark.class.getField("operation").getAnnotationsByType(Param.class)[0].value()) {
104+
log.info("self testing {}", operation);
95105
run(operation);
96106
}
97107
} catch (NoSuchFieldException e) {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
package org.elasticsearch.benchmark.compute.operator;
11+
12+
import org.elasticsearch.test.ESTestCase;
13+
14+
public class EvalBenchmarkTests extends ESTestCase {
15+
public void testSelfTest() {
16+
EvalBenchmark.selfTest();
17+
}
18+
}

distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/SystemJvmOptions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ static List<String> systemJvmOptions(Settings nodeSettings, final Map<String, St
6666
"-Dlog4j2.disable.jmx=true",
6767
"-Dlog4j2.formatMsgNoLookups=true",
6868
"-Djava.locale.providers=CLDR",
69+
// Enable vectorization for whatever version we are running. This ensures we use vectorization even when running EA builds.
70+
"-Dorg.apache.lucene.vectorization.upperJavaFeatureVersion=" + Runtime.version().feature(),
6971
// Pass through distribution type
7072
"-Des.distribution.type=" + distroType
7173
),

docs/changelog/124823.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124823
2+
summary: Report failures on partial results
3+
area: "ES|QL"
4+
type: enhancement
5+
issues: []

libs/entitlement/src/main/java/org/elasticsearch/entitlement/initialization/EntitlementInitialization.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ private static PolicyManager createPolicyManager() {
213213
new FilesEntitlement(serverModuleFileDatas)
214214
)
215215
),
216+
new Scope("java.desktop", List.of(new LoadNativeLibrariesEntitlement())),
216217
new Scope("org.apache.httpcomponents.httpclient", List.of(new OutboundNetworkEntitlement())),
217218
new Scope("io.netty.transport", List.of(new InboundNetworkEntitlement(), new OutboundNetworkEntitlement())),
218219
new Scope(

libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/policy/PolicyManager.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -555,11 +555,7 @@ private void notEntitled(String message, Class<?> callerClass, String componentN
555555
var moduleName = callerClass.getModule().getName();
556556
var loggerSuffix = "." + componentName + "." + ((moduleName == null) ? ALL_UNNAMED : moduleName);
557557
var notEntitledLogger = LogManager.getLogger(PolicyManager.class.getName() + loggerSuffix);
558-
String frameInfoSuffix = StackWalker.getInstance(RETAIN_CLASS_REFERENCE)
559-
.walk(this::findRequestingFrame)
560-
.map(frame -> "\n\tat " + frame)
561-
.orElse("");
562-
notEntitledLogger.warn("Not entitled: " + message + frameInfoSuffix);
558+
notEntitledLogger.warn("Not entitled:", exception);
563559
}
564560
throw exception;
565561
}

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,6 @@ tests:
342342
- class: org.elasticsearch.xpack.ilm.DataStreamAndIndexLifecycleMixingTests
343343
method: testUpdateIndexTemplateToDataStreamLifecyclePreference
344344
issue: https://github.com/elastic/elasticsearch/issues/124837
345-
- class: org.elasticsearch.xpack.esql.optimizer.rules.logical.PropagateInlineEvalsTests
346-
method: testGroupingAliasingMoved_To_LeftSideOfJoin
347-
issue: https://github.com/elastic/elasticsearch/issues/124839
348-
- class: org.elasticsearch.xpack.esql.optimizer.rules.logical.PropagateInlineEvalsTests
349-
method: testGroupingAliasingMoved_To_LeftSideOfJoin_WithExpression
350-
issue: https://github.com/elastic/elasticsearch/issues/124838
351345
- class: org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleServiceIT
352346
method: testAutomaticForceMerge
353347
issue: https://github.com/elastic/elasticsearch/issues/124846

qa/ccs-unavailable-clusters/src/javaRestTest/java/org/elasticsearch/search/CrossClusterSearchUnavailableClusterIT.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,12 @@ private static MockTransportService startTransport(
9191
EsExecutors.DIRECT_EXECUTOR_SERVICE,
9292
SearchShardsRequest::new,
9393
(request, channel, task) -> {
94-
channel.sendResponse(new SearchShardsResponse(List.of(), List.of(), Collections.emptyMap()));
94+
var searchShardsResponse = new SearchShardsResponse(List.of(), List.of(), Collections.emptyMap());
95+
try {
96+
channel.sendResponse(searchShardsResponse);
97+
} finally {
98+
searchShardsResponse.decRef();
99+
}
95100
}
96101
);
97102
newService.registerRequestHandler(
@@ -119,7 +124,12 @@ private static MockTransportService startTransport(
119124
builder.add(node);
120125
}
121126
ClusterState build = ClusterState.builder(clusterName).nodes(builder.build()).build();
122-
channel.sendResponse(new ClusterStateResponse(clusterName, build, false));
127+
var clusterStateResponse = new ClusterStateResponse(clusterName, build, false);
128+
try {
129+
channel.sendResponse(clusterStateResponse);
130+
} finally {
131+
clusterStateResponse.decRef();
132+
}
123133
}
124134
);
125135
newService.start();

0 commit comments

Comments
 (0)