[Fleet] only add time_series_metric if tsdb enabled#171712
[Fleet] only add time_series_metric if tsdb enabled#171712juliaElastic merged 4 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
|
@martijnvg Hey, any idea how could this error be prevented on elasticsearch side? |
|
@elasticmachine run elasticsearch-ci/docs |
|
It is not a change that should be fixed at the ES level, looks like we explicitly did the change to no conditionally render time_series_metrics #157047 ? |
nchaulet
left a comment
There was a problem hiding this comment.
One question, but if it's the direction we want to go code LGTM 🚀
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
Yes, when we removed the condition it was based on the assumption that setting |
|
Hello, We are facing this error after updating our cluster to 8.11.1 We also have this error in the logs of the Elastic Agents :
Could this be related to the issue described here? |
|
Hello @whyyouwannaknow, This looks like an authorization issue, could you raise a support ticket or a bug report in kibana repo? I think it's not the best place to discuss on this pr. |
|
@elasticmachine run elasticsearch-ci/docs |
1 similar comment
|
@elasticmachine run elasticsearch-ci/docs |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
✅ Tested with 8.10.4-SNAPSHOT to 8.11.2-SNAPSHOTSteps:
✅ Tested with 8.10.4-SNAPSHOT to 8.11.1-SNAPSHOT to 8.11.2-SNAPSHOTSteps:
|
Summary
Only set
time_series_metricandtime_series_dimensionin data stream mappings if tsdb is enabled.This fixes an issue with apm package in 8.11.
Steps to reproduce the issue:
mapper_parsing_exception: Field [jvm.memory.non_heap.pool.committed] attempted to shadow a time_series_metric]time_series_metricsis not needed if tsdb is not enabled.This is happening because apm introduced the mapping of jvm fields in 8.11, so clusters that ingested jvm data in apm 8.10 had those fields created as runtime fields. When mappings were updated in 8.11 with jvm fields and
time_series_metric, elasticsearch gave that error with the shadowing, probably because the write index had the runtime mappings.This fix is a change to conditionally add
time_series_metric, it helps with apm because they don't use tsdb.The same issue can technically happen with other packages if they have runtime fields and add mappings on those in a new version, and they use tsdb.
Maybe this should be fixed on elasticsearch side.
An alternative solution would be to do a rollover first (so that runtime fields disappear from write index), and then do the mapping update, however this wouldn't work in all cases as there is a race condition - there could be documents indexed after the rollover before the mapping update.
Checklist