Skip to content

Commit 49a7cb7

Browse files
author
elasticsearchmachine
committed
Merge remote-tracking branch 'origin/main' into lucene_snapshot
2 parents 5a00798 + c9a4206 commit 49a7cb7

File tree

208 files changed

+9111
-5378
lines changed

Some content is hidden

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

208 files changed

+9111
-5378
lines changed

.buildkite/pipelines/periodic.template.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,17 @@ steps:
204204
image: family/elasticsearch-ubuntu-2404
205205
machineType: n2-standard-8
206206
buildDirectory: /dev/shm/bk
207+
- label: third-party / ms-graph
208+
command: |
209+
.ci/scripts/run-gradle.sh msGraphThirdPartyTest
210+
env:
211+
USE_3RD_PARTY_MS_GRAPH_CREDENTIALS: "true"
212+
timeout_in_minutes: 30
213+
agents:
214+
provider: gcp
215+
image: family/elasticsearch-ubuntu-2404
216+
machineType: n2-standard-8
217+
buildDirectory: /dev/shm/bk
207218
- group: lucene-compat
208219
steps:
209220
- label: "{{matrix.LUCENE_VERSION}} / lucene-compat"

.buildkite/pipelines/periodic.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,17 @@ steps:
642642
image: family/elasticsearch-ubuntu-2404
643643
machineType: n2-standard-8
644644
buildDirectory: /dev/shm/bk
645+
- label: third-party / ms-graph
646+
command: |
647+
.ci/scripts/run-gradle.sh msGraphThirdPartyTest
648+
env:
649+
USE_3RD_PARTY_MS_GRAPH_CREDENTIALS: "true"
650+
timeout_in_minutes: 30
651+
agents:
652+
provider: gcp
653+
image: family/elasticsearch-ubuntu-2404
654+
machineType: n2-standard-8
655+
buildDirectory: /dev/shm/bk
645656
- group: lucene-compat
646657
steps:
647658
- label: "{{matrix.LUCENE_VERSION}} / lucene-compat"

.buildkite/scripts/third-party-test-credentials.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,23 @@ if [[ "${USE_3RD_PARTY_GCS_CREDENTIALS:-}" == "true" ]]; then
4848
.buildkite/scripts/third-party-test-credentials.gcs.sh "$google_storage_service_account"
4949
fi
5050

51+
if [[ "${USE_3RD_PARTY_MS_GRAPH_CREDENTIALS:-}" == "true" ]]; then
52+
json=$(vault read -format=json secret/ci/elastic-elasticsearch/ms_graph_thirdparty_test_creds)
5153

54+
MS_GRAPH_TENANT_ID=$(echo "$json" | jq -r .data.tenant_id)
55+
export ms_graph_tenant_id="$MS_GRAPH_TENANT_ID"
56+
57+
MS_GRAPH_CLIENT_ID=$(echo "$json" | jq -r .data.client_id)
58+
export ms_graph_client_id="$MS_GRAPH_CLIENT_ID"
59+
60+
MS_GRAPH_CLIENT_SECRET=$(echo "$json" | jq -r .data.client_secret)
61+
export ms_graph_client_secret="$MS_GRAPH_CLIENT_SECRET"
62+
63+
MS_GRAPH_USERNAME=$(echo "$json" | jq -r .data.username)
64+
export ms_graph_username="$MS_GRAPH_USERNAME"
65+
66+
MS_GRAPH_GROUP_ID=$(echo "$json" | jq -r .data.group_id)
67+
export ms_graph_group_id="$MS_GRAPH_GROUP_ID"
68+
fi
5269

5370
unset json

.github/workflows/docs-preview-comment.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

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

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ static void selfTest() {
9595
try {
9696
for (String groups : ValuesAggregatorBenchmark.class.getField("groups").getAnnotationsByType(Param.class)[0].value()) {
9797
for (String dataType : ValuesAggregatorBenchmark.class.getField("dataType").getAnnotationsByType(Param.class)[0].value()) {
98-
run(Integer.parseInt(groups), dataType, 10);
98+
run(Integer.parseInt(groups), dataType, 10, 0);
99+
run(Integer.parseInt(groups), dataType, 10, 1);
99100
}
100101
}
101102
} catch (NoSuchFieldException e) {
@@ -113,7 +114,10 @@ static void selfTest() {
113114
@Param({ BYTES_REF, INT, LONG })
114115
public String dataType;
115116

116-
private static Operator operator(DriverContext driverContext, int groups, String dataType) {
117+
@Param({ "0", "1" })
118+
public int numOrdinalMerges;
119+
120+
private static Operator operator(DriverContext driverContext, int groups, String dataType, int numOrdinalMerges) {
117121
if (groups == 1) {
118122
return new AggregationOperator(
119123
List.of(supplier(dataType).aggregatorFactory(AggregatorMode.SINGLE, List.of(0)).apply(driverContext)),
@@ -125,7 +129,24 @@ private static Operator operator(DriverContext driverContext, int groups, String
125129
List.of(supplier(dataType).groupingAggregatorFactory(AggregatorMode.SINGLE, List.of(1))),
126130
() -> BlockHash.build(groupSpec, driverContext.blockFactory(), 16 * 1024, false),
127131
driverContext
128-
);
132+
) {
133+
@Override
134+
public Page getOutput() {
135+
mergeOrdinal();
136+
return super.getOutput();
137+
}
138+
139+
// simulate OrdinalsGroupingOperator
140+
void mergeOrdinal() {
141+
var merged = supplier(dataType).groupingAggregatorFactory(AggregatorMode.SINGLE, List.of(1)).apply(driverContext);
142+
for (int i = 0; i < numOrdinalMerges; i++) {
143+
for (int p = 0; p < groups; p++) {
144+
merged.addIntermediateRow(p, aggregators.getFirst(), p);
145+
}
146+
}
147+
aggregators.set(0, merged);
148+
}
149+
};
129150
}
130151

131152
private static AggregatorFunctionSupplier supplier(String dataType) {
@@ -331,12 +352,12 @@ private static Block groupingBlock(int groups) {
331352

332353
@Benchmark
333354
public void run() {
334-
run(groups, dataType, OP_COUNT);
355+
run(groups, dataType, OP_COUNT, numOrdinalMerges);
335356
}
336357

337-
private static void run(int groups, String dataType, int opCount) {
358+
private static void run(int groups, String dataType, int opCount, int numOrdinalMerges) {
338359
DriverContext driverContext = driverContext();
339-
try (Operator operator = operator(driverContext, groups, dataType)) {
360+
try (Operator operator = operator(driverContext, groups, dataType, numOrdinalMerges)) {
340361
Page page = page(groups, dataType);
341362
for (int i = 0; i < opCount; i++) {
342363
operator.addInput(page.shallowCopy());

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
import org.elasticsearch.compute.data.Page;
4242
import org.elasticsearch.compute.lucene.LuceneSourceOperator;
4343
import org.elasticsearch.compute.lucene.ShardRefCounted;
44-
import org.elasticsearch.compute.lucene.ValuesSourceReaderOperator;
44+
import org.elasticsearch.compute.lucene.read.ValuesSourceReaderOperator;
45+
import org.elasticsearch.compute.lucene.read.ValuesSourceReaderOperatorStatus;
4546
import org.elasticsearch.compute.operator.topn.TopNOperator;
4647
import org.elasticsearch.core.IOUtils;
4748
import org.elasticsearch.index.IndexSettings;
@@ -343,7 +344,7 @@ public void benchmark() {
343344
);
344345
long sum = 0;
345346
for (Page page : pages) {
346-
op.addInput(page);
347+
op.addInput(page.shallowCopy());
347348
switch (name) {
348349
case "long" -> {
349350
LongVector values = op.getOutput().<LongBlock>getBlock(1).asVector();
@@ -411,7 +412,7 @@ public void benchmark() {
411412
throw new AssertionError("[" + layout + "][" + name + "] expected [" + expected + "] but was [" + sum + "]");
412413
}
413414
boolean foundStoredFieldLoader = false;
414-
ValuesSourceReaderOperator.Status status = (ValuesSourceReaderOperator.Status) op.status();
415+
ValuesSourceReaderOperatorStatus status = (ValuesSourceReaderOperatorStatus) op.status();
415416
for (Map.Entry<String, Integer> e : status.readersBuilt().entrySet()) {
416417
if (e.getKey().indexOf("stored_fields") >= 0) {
417418
foundStoredFieldLoader = true;

docs/changelog/128917.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 128917
2+
summary: Adopt a "LogicalPlan" approach to running multiple sub-queries (with INLINESTATS
3+
so far)
4+
area: ES|QL
5+
type: enhancement
6+
issues: []

docs/changelog/130452.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 130452
2+
summary: "Aggs: Add cancellation checks to `FilterByFilter` aggregator"
3+
area: Aggregations
4+
type: bug
5+
issues: []

docs/changelog/130576.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 130576
2+
summary: Avoid O(N^2) in VALUES with ordinals grouping
3+
area: ES|QL
4+
type: bug
5+
issues: []

docs/changelog/130594.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 130594
2+
summary: Add audit logging for stream content
3+
area: Network
4+
type: enhancement
5+
issues: []

0 commit comments

Comments
 (0)