Skip to content

[9.3] Sort the values of a legacy histogram during downsampling (#140771)#140829

Merged
elasticsearchmachine merged 1 commit intoelastic:9.3from
gmarouli:backport/9.3/pr-140771
Jan 16, 2026
Merged

[9.3] Sort the values of a legacy histogram during downsampling (#140771)#140829
elasticsearchmachine merged 1 commit intoelastic:9.3from
gmarouli:backport/9.3/pr-140771

Conversation

@gmarouli
Copy link
Copy Markdown
Contributor

Backports the following commits to 9.3:

…0771)

When indexing legacy histograms in elasticsearch we require that their
values are sorted. 

When downsampling is using the aggregate method, it merges the
histograms to a single one and indexes it in the target index. We
noticed that some merging algorithms do not guarantee that the centroids
will be sorted. 

This PR adds code that sorts the centroids before they are indexed to
the target index to avoid indexing failures.

Fixes elastic#139382
@gmarouli gmarouli added :StorageEngine/Downsampling Downsampling (replacement for rollups) - Turn fine-grained time-based data into coarser-grained data >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:StorageEngine labels Jan 16, 2026
@elasticsearchmachine elasticsearchmachine merged commit b53a041 into elastic:9.3 Jan 16, 2026
35 checks passed
@gmarouli gmarouli deleted the backport/9.3/pr-140771 branch January 16, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :StorageEngine/Downsampling Downsampling (replacement for rollups) - Turn fine-grained time-based data into coarser-grained data Team:StorageEngine v9.3.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants