Log the stacktrace when we encounter a deprecation warning for default_metric#143929
Merged
gmarouli merged 3 commits intoelastic:mainfrom Mar 10, 2026
Merged
Conversation
Collaborator
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
DaveCTurner
reviewed
Mar 10, 2026
server/src/main/java/org/elasticsearch/index/mapper/FieldMapper.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/40_tsdb.yml
Outdated
Show resolved
Hide resolved
x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/40_tsdb.yml
Outdated
Show resolved
Hide resolved
Comment on lines
+693
to
+694
| cluster.put_settings: | ||
| body: > |
Member
There was a problem hiding this comment.
Also, enabling the logger here for this one test case is likely to miss the source of the leak, which we suspect to be an earlier test case. Let's turn on this logging for the whole cluster for the duration of the test.
DaveCTurner
reviewed
Mar 10, 2026
| } catch (WarningFailureException warningException) { | ||
| Map<String, Object> indexMapping = ESRestTestCase.getIndexMapping("metrics-long"); | ||
| logger.error("Received warning when creating index [metrics-long] with mapping [{}]", indexMapping); | ||
| // Remove try-catch after https://github.com/elastic/elasticsearch/issues/143884 |
| logger.error("Received warning when creating index [metrics-long] with mapping [{}]", indexMapping); | ||
| // Remove try-catch after https://github.com/elastic/elasticsearch/issues/143884 | ||
| List<String> warnings = warningException.getResponse().getWarnings(); | ||
| if (warnings.size() == 1 |
Member
There was a problem hiding this comment.
Why not if multiple warnings?
Contributor
Author
There was a problem hiding this comment.
Ah, I was too sloppy 😮💨
| setup: | ||
| - requires: | ||
| test_runner_features: [allowed_warnings_regex, allowed_warnings] | ||
| # Remove enabling debug logging after https://github.com/elastic/elasticsearch/issues/143884 |
Member
There was a problem hiding this comment.
This one too - if the warning is leaking in from an earlier test then we won't catch it like this. We need the logging enabled for the whole test run.
default_metric
Contributor
Author
Thank you for the quick and sharp review @DaveCTurner . |
szybia
added a commit
to szybia/elasticsearch
that referenced
this pull request
Mar 10, 2026
…locations * upstream/main: (126 commits) Update KnnIndexTester to use more settings from datasets (elastic#143869) fix: dynamic template vector array is overridden by automatic dense_vector mapping (elastic#143733) ES|QL: Don't reuse the same alias for _fork column (elastic#143909) Close and initialize clients after each node upgrade in logsdb rolling upgrade tests. (elastic#143823) ESQL: Added GroupedTopNOperator for LIMIT BY, compute only (elastic#143476) Handle views in ResolveIndexAction (elastic#143561) Improve reindex rethrottle API in stateless (elastic#143771) Use a copy of the SearchExecutionContext for each Percolator execution (elastic#142765) Log the stacktrace when we encounter a deprecation warning for `default_metric` (elastic#143929) ESQL: evaluate ReferenceAttributes to potentially FieldAttributes for full-text functions restriction (elastic#143893) Add ClusterStateSerializationStats Serializatation Tests (elastic#142703) Adds Coordination Diagnostics Tests (elastic#142709) Upgrade Elasticsearch to Apache Lucene 10.4 (elastic#141882) ESQL: Add configurable bracket-based multi-value support for CSV reader (elastic#143890) time series es819 binary dv use up to a 1mb block size (elastic#143049) Dynamically enable / disable plugins in correspondence to stateless mode. (elastic#142147) ES|QL: Implement first/last_over_time for tdigest (elastic#143832) Document CHANGE_POINT limitation (elastic#143877) Fix OperationsOnSeqNoDisabledIndicesIT (elastic#143892) [Test] Test that sequence numbers are not pruned with retention lease (elastic#143825) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While we investigate #143884, we enhance log the stack trace during debug mode but we also allow the unexpected warning in our ci, so the tests will not remain muted for too long.
When #143884 is closed, this PR needs to be reverted (apart from the test unmuting).