Skip to content

[8.x] Optimize ES819 doc values address offset calculation (#126732)#127079

Merged
elasticsearchmachine merged 1 commit intoelastic:8.xfrom
jordan-powers:backport/8.x/pr-126732
Apr 18, 2025
Merged

[8.x] Optimize ES819 doc values address offset calculation (#126732)#127079
elasticsearchmachine merged 1 commit intoelastic:8.xfrom
jordan-powers:backport/8.x/pr-126732

Conversation

@jordan-powers
Copy link
Contributor

Backports the following commits to 8.x:

When writing the doc values addresses, we currently perform an iteration 
over all the sorted numeric doc values to calculate the addresses. When
merging sorted segments, this iteration is expensive as it requires
performing a merge sort.

This patch removes this iteration by instead calculating the addresses
while we are writing the values, writing the addresses to a  temporary
file. Afterwards, they are copied from the temporary file into the
merged segment.

Relates to elastic#126111
@jordan-powers jordan-powers added :StorageEngine/Codec >non-issue auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:StorageEngine labels Apr 18, 2025
@elasticsearchmachine elasticsearchmachine merged commit 0d37677 into elastic:8.x Apr 18, 2025
15 checks passed
@jordan-powers jordan-powers deleted the backport/8.x/pr-126732 branch April 18, 2025 22:13
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 >non-issue :StorageEngine/Codec Team:StorageEngine v8.19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments