Refactor downsampling fetchers and producers#140357
Merged
elasticsearchmachine merged 18 commits intoelastic:mainfrom Feb 27, 2026
Merged
Refactor downsampling fetchers and producers#140357elasticsearchmachine merged 18 commits intoelastic:mainfrom
elasticsearchmachine merged 18 commits intoelastic:mainfrom
Conversation
Contributor
Author
|
Buildkite benchmark this with tsdb please |
Collaborator
💚 Build Succeeded
This build ran two tsdb benchmarks to evaluate performance impact of this PR. History |
Collaborator
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
martijnvg
approved these changes
Feb 27, 2026
Member
martijnvg
left a comment
There was a problem hiding this comment.
LGTM 👍
Apologies that it took such a long time to review.
Contributor
Author
Thank you @martijnvg no worries, these things happen :) |
PeteGillinElastic
pushed a commit
to PeteGillinElastic/elasticsearch
that referenced
this pull request
Feb 27, 2026
This refactoring merges the code of the `FieldValueFetcher` and the `AbstractDownsampleFieldProducer`. Until now the `FieldValueFetcher` was responsible for loading the values and creating and exposing a `AbstractDownsampleFieldProducer` that was able to collect the raw values and produce a downsampled value per field. In the last releases we have increased the types of fields that can be downsampled. As a result, we made `AbstractDownsampleFieldProducer` generic. Furthermore, with the introduction of the different sampling method, the `AbstractDownsampleFieldProducer` became much more complex than the `FieldValueFetcher`. In this PR, we merge their functionalities into `AbstractFieldDownsampler` which provides the methods to both load the doc values and collect the values. Finally, with the possibility of an aggregate counter that is going to produce more than one downsampled values, we revert the code of the `DownsampleShardIndexer` to handle the different downsamplers (old producers) depending on their type in order to avoid reflection checks when collecting and writing the downsampled documents.
szybia
added a commit
to szybia/elasticsearch
that referenced
this pull request
Feb 27, 2026
…cations * upstream/main: (35 commits) Create ARM bulk sqrI8 implementation (elastic#142461) Rework get-snapshots predicates (elastic#143161) Refactor downsampling fetchers and producers (elastic#140357) ESQL: Unmute test and add extra logging to generative test validation (elastic#143168) Fix metadata fields being nullified/loaded by unmapped_fields setting (elastic#143155) Determine remote cluster version (elastic#142494) Populate failure message for aborted clones (elastic#143206) Allow kibana_system role to read and manage logs streams (elastic#143053) Mute org.elasticsearch.xpack.esql.CsvIT test {csv-spec:eval.DocsLength} elastic#143224 Mute org.elasticsearch.xpack.esql.CsvIT test {csv-spec:eval.DocsByteLength} elastic#143223 Mute org.elasticsearch.xpack.esql.CsvIT test {csv-spec:docs.DocsBitLength} elastic#143222 Fix FloatVectorScorerSupplier bulkScore bug (elastic#143211) ESQL: Add data node execution for external sources (elastic#143209) [ESQL] Cleanup commands docs (elastic#143058) [ML]Fix latest transforms disregarding updates when sort and sync fields are non-monotonic (elastic#142856) Mute org.elasticsearch.index.mapper.IpFieldMapperTests testSyntheticSourceInObject elastic#143212 Tests: Fix StoreDirectoryMetricsIT (elastic#143084) ESQL: Add distribution strategy for external sources (elastic#143194) CSV IT spec (elastic#142585) Fix VectorScorerOSQBenchmark.score to read corrections properly (elastic#143137) ...
tballison
pushed a commit
to tballison/elasticsearch
that referenced
this pull request
Mar 3, 2026
This refactoring merges the code of the `FieldValueFetcher` and the `AbstractDownsampleFieldProducer`. Until now the `FieldValueFetcher` was responsible for loading the values and creating and exposing a `AbstractDownsampleFieldProducer` that was able to collect the raw values and produce a downsampled value per field. In the last releases we have increased the types of fields that can be downsampled. As a result, we made `AbstractDownsampleFieldProducer` generic. Furthermore, with the introduction of the different sampling method, the `AbstractDownsampleFieldProducer` became much more complex than the `FieldValueFetcher`. In this PR, we merge their functionalities into `AbstractFieldDownsampler` which provides the methods to both load the doc values and collect the values. Finally, with the possibility of an aggregate counter that is going to produce more than one downsampled values, we revert the code of the `DownsampleShardIndexer` to handle the different downsamplers (old producers) depending on their type in order to avoid reflection checks when collecting and writing the downsampled documents.
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.
This refactoring merges the code of the
FieldValueFetcherand theAbstractDownsampleFieldProducer.Until now the
FieldValueFetcherwas responsible for loading the values and creating and exposing aAbstractDownsampleFieldProducerthat was able to collect the raw values and produce a downsampled value per field.In the last releases we have increased the types of fields that can be downsampled. As a result, we made
AbstractDownsampleFieldProducergeneric. Furthermore, with the introduction of the different sampling method, theAbstractDownsampleFieldProducerbecame much more complex than theFieldValueFetcher.In this PR, we merge their functionalities into
AbstractFieldDownsamplerwhich provides the methods to both load the doc values and collect the values.Finally, with the possibility of an aggregate counter that is going to produce more than one downsampled values, we revert the code of the
DownsampleShardIndexerto handle the different downsamplers (old producers) depending on their type in order to avoid reflection checks when collecting and writing the downsampled documents.