Skip to content

Commit 719df83

Browse files
authored
Merge branch 'main' into fix_136365_prune_columns_when_fork
2 parents fcb52f2 + ec4daed commit 719df83

File tree

92 files changed

+1150
-216
lines changed

Some content is hidden

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

92 files changed

+1150
-216
lines changed

benchmarks/src/main/java/org/elasticsearch/benchmark/_nightly/esql/QueryPlanningBenchmark.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ public void setup() {
9292
System.nanoTime(),
9393
false,
9494
AnalyzerSettings.QUERY_TIMESERIES_RESULT_TRUNCATION_DEFAULT_SIZE.getDefault(Settings.EMPTY),
95-
AnalyzerSettings.QUERY_TIMESERIES_RESULT_TRUNCATION_DEFAULT_SIZE.get(Settings.EMPTY)
95+
AnalyzerSettings.QUERY_TIMESERIES_RESULT_TRUNCATION_DEFAULT_SIZE.get(Settings.EMPTY),
96+
null
9697
);
9798

9899
var fields = 10_000;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,8 @@ private static Configuration configuration() {
373373
0,
374374
false,
375375
AnalyzerSettings.QUERY_TIMESERIES_RESULT_TRUNCATION_MAX_SIZE.getDefault(Settings.EMPTY),
376-
AnalyzerSettings.QUERY_TIMESERIES_RESULT_TRUNCATION_DEFAULT_SIZE.getDefault(Settings.EMPTY)
376+
AnalyzerSettings.QUERY_TIMESERIES_RESULT_TRUNCATION_DEFAULT_SIZE.getDefault(Settings.EMPTY),
377+
null
377378
);
378379
}
379380

build-tools/src/main/java/org/elasticsearch/gradle/testclusters/MockApmServer.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,26 @@ public void stop() {
114114
}
115115

116116
class RootHandler implements HttpHandler {
117+
// checked by APM agent to identify the APM server version to adjust its behavior accordingly
118+
private static final String FAKE_VERSION = """
119+
{
120+
"build_date": "2021-12-18T19:59:06Z",
121+
"build_sha": "24fe620eeff5a19e2133c940c7e5ce1ceddb1445",
122+
"publish_ready": true,
123+
"version": "9.0.0"
124+
}
125+
""";
126+
117127
public void handle(HttpExchange t) {
118128
try {
129+
if ("GET".equals(t.getRequestMethod()) && "/".equals(t.getRequestURI().getPath())) {
130+
t.sendResponseHeaders(200, FAKE_VERSION.length());
131+
try (OutputStream os = t.getResponseBody()) {
132+
os.write(FAKE_VERSION.getBytes());
133+
}
134+
return;
135+
}
136+
119137
InputStream body = t.getRequestBody();
120138
if (metricFilter == null && transactionFilter == null) {
121139
logRequestBody(body);

docs/changelog/137920.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 137920
2+
summary: Avoid retrieving unnecessary fields on node-reduce phase
3+
area: "ES|QL"
4+
type: enhancement
5+
issues:
6+
- 134363

docs/changelog/138457.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 138457
2+
summary: Intercept filters to knn queries
3+
area: Vector Search
4+
type: bug
5+
issues:
6+
- 138410

docs/changelog/138631.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 138631
2+
summary: Improved bulk loading for binary doc values
3+
area: Codec
4+
type: enhancement
5+
issues: []

modules/apm/src/main/java/org/elasticsearch/telemetry/apm/internal/tracing/APMTracer.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,14 @@ public void startTrace(TraceContext traceContext, Traceable traceable, String sp
192192
}
193193

194194
final Span span = spanBuilder.startSpan();
195-
// If not a root span (meaning a local parent exists) and the agent decided not to record the span, discard it immediately.
196-
// Root spans (transactions), however, have to be kept to correctly report their duration.
197-
if (localParentContext != null && span.isRecording() == false) {
198-
logger.trace("Span [{}] [{}] will not be recorded due to transaction_max_spans reached", spanId, spanName);
195+
if (span.isRecording() == false) {
196+
if (localParentContext == null) {
197+
// this root span (transactions) is dropped due to sampling; the agent might report these when connected to
198+
// very old versions of apm server, however (with an incorrect duration)
199+
logger.trace("Root span [{}] [{}] will not be recorded due to sampling", spanId, spanName);
200+
} else {
201+
logger.trace("Span [{}] [{}] will not be recorded due to transaction_max_spans reached", spanId, spanName);
202+
}
199203
span.end(); // end span immediately to release any resources.
200204
return null; // return null to discard and not record in map of spans
201205
}

modules/apm/src/test/java/org/elasticsearch/telemetry/apm/internal/tracing/APMTracerTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ public void test_onTraceStarted_ifNotRecorded_doesNotStartTracing() {
109109
apmTracer.startTrace(traceContext, TRACEABLE1, "name1_discard", null);
110110

111111
assertThat(traceContext.getTransient(Task.APM_TRACE_CONTEXT), nullValue());
112-
// the root span (transaction) is tracked
113-
assertThat(apmTracer.getSpans(), aMapWithSize(1));
114-
assertThat(apmTracer.getSpans(), hasKey(TRACEABLE1.getSpanId()));
112+
assertThat(apmTracer.getSpans(), anEmptyMap());
115113
}
116114

117115
/**

modules/data-streams/src/test/java/org/elasticsearch/datastreams/mapper/DataStreamTimestampFieldMapperTests.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,6 @@ public void testValidateInvalidFieldType() {
119119
);
120120
}
121121

122-
public void testValidateNotIndexed() {
123-
Exception e = expectThrows(IllegalArgumentException.class, () -> createMapperService(timestampMapping(true, b -> {
124-
b.startObject("@timestamp");
125-
b.field("type", "date");
126-
b.field("index", false);
127-
b.endObject();
128-
})));
129-
assertThat(e.getMessage(), equalTo("data stream timestamp field [@timestamp] is not indexed"));
130-
}
131-
132122
public void testValidateNotDocValues() {
133123
Exception e = expectThrows(IllegalArgumentException.class, () -> createMapperService(timestampMapping(true, b -> {
134124
b.startObject("@timestamp");

modules/legacy-geo/src/test/java/org/elasticsearch/legacygeo/mapper/LegacyGeoShapeFieldMapperTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,4 +671,9 @@ protected IngestScriptSupport ingestScriptSupport() {
671671
protected List<SortShortcutSupport> getSortShortcutSupport() {
672672
return List.of();
673673
}
674+
675+
@Override
676+
protected boolean supportsDocValuesSkippers() {
677+
return false;
678+
}
674679
}

0 commit comments

Comments
 (0)