Skip to content

Commit 7b43ee8

Browse files
authored
Merge branch 'main' into chunk-multi-value
2 parents 81416bb + b0a74a4 commit 7b43ee8

File tree

160 files changed

+4144
-665
lines changed

Some content is hidden

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

160 files changed

+4144
-665
lines changed

.buildkite/pipelines/periodic-java-ea.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,8 @@ steps:
404404
- signal_reason: agent_stop
405405
limit: 3
406406

407-
- label: 9.1.11 / bwc
408-
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v9.1.11#bwcTest
407+
- label: 9.1.10 / bwc
408+
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v9.1.10#bwcTest
409409
timeout_in_minutes: 300
410410
agents:
411411
provider: gcp
@@ -414,7 +414,7 @@ steps:
414414
buildDirectory: /dev/shm/bk
415415
preemptible: true
416416
env:
417-
BWC_VERSION: 9.1.11
417+
BWC_VERSION: 9.1.10
418418
retry:
419419
automatic:
420420
- exit_status: "-1"

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ steps:
368368
env:
369369
BWC_VERSION: 9.0.8
370370

371-
- label: "{{matrix.image}} / 9.1.11 / packaging-tests-upgrade"
372-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.11
371+
- label: "{{matrix.image}} / 9.1.10 / packaging-tests-upgrade"
372+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.10
373373
timeout_in_minutes: 300
374374
matrix:
375375
setup:
@@ -382,7 +382,7 @@ steps:
382382
machineType: custom-16-32768
383383
buildDirectory: /dev/shm/bk
384384
env:
385-
BWC_VERSION: 9.1.11
385+
BWC_VERSION: 9.1.10
386386

387387
- label: "{{matrix.image}} / 9.2.6 / packaging-tests-upgrade"
388388
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.2.6

.buildkite/pipelines/periodic.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,8 @@ steps:
457457
- exit_status: "1"
458458
limit: 1
459459

460-
- label: 9.1.11 / bwc
461-
command: .ci/scripts/run-gradle.sh --continue -Dbwc.checkout.align=true v9.1.11#bwcTest
460+
- label: 9.1.10 / bwc
461+
command: .ci/scripts/run-gradle.sh --continue -Dbwc.checkout.align=true v9.1.10#bwcTest
462462
timeout_in_minutes: 300
463463
agents:
464464
provider: gcp
@@ -467,7 +467,7 @@ steps:
467467
buildDirectory: /dev/shm/bk
468468
preemptible: true
469469
env:
470-
BWC_VERSION: 9.1.11
470+
BWC_VERSION: 9.1.10
471471
retry:
472472
automatic:
473473
- exit_status: "-1"

.ci/bwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ BWC_VERSION:
2020
- "8.18.8"
2121
- "8.19.12"
2222
- "9.0.8"
23-
- "9.1.11"
23+
- "9.1.10"
2424
- "9.2.6"
2525
- "9.3.0"
2626
- "9.4.0"

benchmarks/src/main/java/org/elasticsearch/benchmark/compute/operator/TopNBenchmark.java renamed to benchmarks/src/main/java/org/elasticsearch/benchmark/_nightly/esql/TopNBenchmark.java

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
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.util.BytesRef;
1313
import org.elasticsearch.common.breaker.CircuitBreaker;
1414
import org.elasticsearch.common.breaker.NoopCircuitBreaker;
15+
import org.elasticsearch.common.logging.LogConfigurator;
1516
import org.elasticsearch.common.settings.ClusterSettings;
1617
import org.elasticsearch.common.settings.Settings;
1718
import org.elasticsearch.common.util.BigArrays;
@@ -41,6 +42,7 @@
4142

4243
import java.util.ArrayList;
4344
import java.util.List;
45+
import java.util.Random;
4446
import java.util.concurrent.TimeUnit;
4547
import java.util.stream.IntStream;
4648

@@ -57,7 +59,7 @@ public class TopNBenchmark {
5759
BigArrays.NON_RECYCLING_INSTANCE
5860
);
5961

60-
private static final int BLOCK_LENGTH = 8 * 1024;
62+
private static final int BLOCK_LENGTH = 4 * 1024;
6163

6264
private static final String LONGS = "longs";
6365
private static final String INTS = "ints";
@@ -68,6 +70,7 @@ public class TopNBenchmark {
6870
private static final String LONGS_AND_BYTES_REFS = LONGS + "_and_" + BYTES_REFS;
6971

7072
static {
73+
LogConfigurator.configureESLogging();
7174
// Smoke test all the expected values and force loading subclasses more like prod
7275
selfTest();
7376
}
@@ -76,7 +79,9 @@ static void selfTest() {
7679
try {
7780
for (String data : TopNBenchmark.class.getField("data").getAnnotationsByType(Param.class)[0].value()) {
7881
for (String topCount : TopNBenchmark.class.getField("topCount").getAnnotationsByType(Param.class)[0].value()) {
79-
run(data, Integer.parseInt(topCount));
82+
for (String sortedInput : TopNBenchmark.class.getField("sortedInput").getAnnotationsByType(Param.class)[0].value()) {
83+
run(data, Integer.parseInt(topCount), Boolean.parseBoolean(sortedInput));
84+
}
8085
}
8186
}
8287
} catch (NoSuchFieldException e) {
@@ -87,10 +92,19 @@ static void selfTest() {
8792
@Param({ LONGS, INTS, DOUBLES, BOOLEANS, BYTES_REFS, TWO_LONGS, LONGS_AND_BYTES_REFS })
8893
public String data;
8994

90-
@Param({ "10", "10000" })
95+
@Param({ "true", "false" })
96+
public boolean sortedInput;
97+
98+
/*
99+
- 4096 is the page size,
100+
- 10000 reflects using a LIMIT with smaller pages, which seems to be a more realistic
101+
benchmark than having a LIMIT 10 and receiving pages from the data nodes that
102+
contain 4096 documents
103+
*/
104+
@Param({ "10", "1000", "4096", "10000" })
91105
public int topCount;
92106

93-
private static Operator operator(String data, int topCount) {
107+
private static Operator operator(String data, int topCount, boolean sortedInput) {
94108
int count = switch (data) {
95109
case LONGS, INTS, DOUBLES, BOOLEANS, BYTES_REFS -> 1;
96110
case TWO_LONGS, LONGS_AND_BYTES_REFS -> 2;
@@ -125,8 +139,9 @@ private static Operator operator(String data, int topCount) {
125139
topCount,
126140
elementTypes,
127141
encoders,
128-
IntStream.range(0, count).mapToObj(c -> new TopNOperator.SortOrder(c, false, false)).toList(),
129-
16 * 1024
142+
IntStream.range(0, count).mapToObj(c -> new TopNOperator.SortOrder(c, true, false)).toList(),
143+
8 * 1024,
144+
sortedInput ? TopNOperator.InputOrdering.SORTED : TopNOperator.InputOrdering.NOT_SORTED
130145
);
131146
}
132147

@@ -144,41 +159,52 @@ private static Page page(String data) {
144159
};
145160
}
146161

162+
// This creates blocks with uniformly random distributed and sorted data
147163
private static Block block(String data) {
148164
return switch (data) {
149165
case LONGS -> {
150166
var builder = blockFactory.newLongBlockBuilder(BLOCK_LENGTH);
151-
for (int i = 0; i < BLOCK_LENGTH; i++) {
152-
builder.appendLong(i);
153-
}
167+
168+
new Random().longs(BLOCK_LENGTH, 0, Long.MAX_VALUE).sorted().forEachOrdered(builder::appendLong);
169+
154170
yield builder.build();
155171
}
156172
case INTS -> {
157173
var builder = blockFactory.newIntBlockBuilder(BLOCK_LENGTH);
158-
for (int i = 0; i < BLOCK_LENGTH; i++) {
159-
builder.appendInt(i);
160-
}
174+
175+
new Random().ints(BLOCK_LENGTH, 0, Integer.MAX_VALUE).sorted().forEachOrdered(builder::appendInt);
176+
161177
yield builder.build();
162178
}
163179
case DOUBLES -> {
164180
var builder = blockFactory.newDoubleBlockBuilder(BLOCK_LENGTH);
165-
for (int i = 0; i < BLOCK_LENGTH; i++) {
166-
builder.appendDouble(i);
167-
}
181+
182+
new Random().doubles(BLOCK_LENGTH, 0, Double.MAX_VALUE).sorted().forEachOrdered(builder::appendDouble);
183+
168184
yield builder.build();
169185
}
170186
case BOOLEANS -> {
171187
BooleanBlock.Builder builder = blockFactory.newBooleanBlockBuilder(BLOCK_LENGTH);
172-
for (int i = 0; i < BLOCK_LENGTH; i++) {
173-
builder.appendBoolean(i % 2 == 1);
188+
189+
int falseCount = BLOCK_LENGTH / 2;
190+
int trueCount = BLOCK_LENGTH - falseCount;
191+
192+
for (int i = 0; i < falseCount; i++) {
193+
builder.appendBoolean(false);
174194
}
195+
for (int i = 0; i < trueCount; i++) {
196+
builder.appendBoolean(true);
197+
}
198+
175199
yield builder.build();
176200
}
177201
case BYTES_REFS -> {
178202
BytesRefBlock.Builder builder = blockFactory.newBytesRefBlockBuilder(BLOCK_LENGTH);
179-
for (int i = 0; i < BLOCK_LENGTH; i++) {
180-
builder.appendBytesRef(new BytesRef(Integer.toString(i)));
181-
}
203+
new Random().ints(BLOCK_LENGTH, 0, Integer.MAX_VALUE)
204+
.mapToObj(Integer::toString)
205+
.sorted()
206+
.forEachOrdered(s -> builder.appendBytesRef(new BytesRef(s)));
207+
182208
yield builder.build();
183209
}
184210
default -> throw new UnsupportedOperationException("unsupported data [" + data + "]");
@@ -188,11 +214,11 @@ private static Block block(String data) {
188214
@Benchmark
189215
@OperationsPerInvocation(1024 * BLOCK_LENGTH)
190216
public void run() {
191-
run(data, topCount);
217+
run(data, topCount, sortedInput);
192218
}
193219

194-
private static void run(String data, int topCount) {
195-
try (Operator operator = operator(data, topCount)) {
220+
private static void run(String data, int topCount, boolean sortedInput) {
221+
try (Operator operator = operator(data, topCount, sortedInput)) {
196222
Page page = page(data);
197223
for (int i = 0; i < 1024; i++) {
198224
operator.addInput(page.shallowCopy());

benchmarks/src/main/java/org/elasticsearch/benchmark/vector/scorer/VectorScorerOSQBenchmark.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public float[] score() throws IOException {
198198
result.upperInterval(),
199199
result.quantizedComponentSum(),
200200
result.additionalCorrection(),
201-
VectorSimilarityFunction.EUCLIDEAN,
201+
similarityFunction,
202202
centroidDp,
203203
corrections[0],
204204
corrections[1],

benchmarks/src/test/java/org/elasticsearch/benchmark/compute/operator/TopNBenchmarkTests.java renamed to benchmarks/src/test/java/org/elasticsearch/benchmark/_nightly/esql/TopNBenchmarkTests.java

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

benchmarks/src/test/java/org/elasticsearch/benchmark/vector/scorer/VectorScorerOSQBenchmarkTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void testSingleScalarVsVectorized() throws Exception {
7373

7474
float[] result = vectorized.score();
7575

76-
assertArrayEqualsPercent("single scoring, scalar VS vectorized", expected, result, deltaPercent);
76+
assertArrayEqualsPercent("single scoring, scalar VS vectorized", expected, result, deltaPercent, DEFAULT_DELTA);
7777
} finally {
7878
scalar.teardown();
7979
vectorized.teardown();
@@ -93,6 +93,7 @@ public void testBulkScalarVsVectorized() throws Exception {
9393
scalar.dims = dims;
9494
scalar.bits = bits;
9595
scalar.directoryType = directoryType;
96+
scalar.similarityFunction = similarityFunction;
9697
scalar.setup(new Random(seed));
9798

9899
float[] expected = scalar.bulkScore();
@@ -101,11 +102,12 @@ public void testBulkScalarVsVectorized() throws Exception {
101102
vectorized.dims = dims;
102103
vectorized.bits = bits;
103104
vectorized.directoryType = directoryType;
105+
vectorized.similarityFunction = similarityFunction;
104106
vectorized.setup(new Random(seed));
105107

106108
float[] result = vectorized.bulkScore();
107109

108-
assertArrayEqualsPercent("bulk scoring, scalar VS vectorized", expected, result, deltaPercent);
110+
assertArrayEqualsPercent("bulk scoring, scalar VS vectorized", expected, result, deltaPercent, DEFAULT_DELTA);
109111
} finally {
110112
scalar.teardown();
111113
vectorized.teardown();

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/RestrictedBuildApiService.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
4444
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:rolling-upgrade-multi-cluster");
4545
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:runtime-fields:core-with-mapped");
4646
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:runtime-fields:core-with-search");
47-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:security-example-spi-extension");
48-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:security-setup-password-tests");
4947
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:xpack-prefix-rest-compat");
5048
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:ent-search:qa:rest");
5149
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:eql:qa:ccs-rolling-upgrade");
@@ -66,8 +64,6 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
6664
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:snapshot-based-recoveries:qa:license-enforcing");
6765
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:snapshot-repo-test-kit:qa:hdfs");
6866
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:snapshot-repo-test-kit:qa:rest");
69-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:sql:qa:server:security:with-ssl");
70-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:sql:qa:server:security:without-ssl");
7167
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:text-structure:qa:text-structure-with-security");
7268
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:transform:qa:multi-cluster-tests-with-security");
7369
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:transform:qa:multi-node-tests");

build-tools-internal/src/main/resources/checkstyle_suppressions.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<suppress files="plugin[/\\]eql[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]eql[/\\]parser[/\\]EqlBase(Base(Listener|Visitor)|Lexer|Listener|Parser|Visitor).java" checks="." />
1515
<suppress files="plugin[/\\]esql[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]esql[/\\]parser[/\\](EsqlBase|PromqlBase)(Parser|Lexer).*.java" checks="." />
1616
<suppress files="x-pack[/\\]plugin[/\\]otel-data[/\\]build[/\\]generated[/\\]sources[/\\]" checks="." />
17+
<suppress files="x-pack[/\\]plugin[/\\]prometheus[/\\]build[/\\]generated[/\\]sources[/\\]" checks="." />
1718

1819
<!-- JNA requires the no-argument constructor on JNAKernel32Library.SizeT to be public-->
1920
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]bootstrap[/\\]JNAKernel32Library.java" checks="RedundantModifier" />

0 commit comments

Comments
 (0)