Apply TSDB jump table and offset construction optimizations to binary doc values#127278
Merged
jordan-powers merged 9 commits intoelastic:mainfrom Apr 24, 2025
Merged
Conversation
Collaborator
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
5 tasks
martijnvg
approved these changes
Apr 24, 2025
| meta.writeLong(offset); // docsWithFieldOffset | ||
| final short jumpTableEntryCount; | ||
| if (disiAccumulator != null) { | ||
| jumpTableEntryCount = disiAccumulator.build(data); |
Member
There was a problem hiding this comment.
I think at the place disiAccumulator should always be not null? (if numDocsWithField is not -1 or equal to max doc and valueProducer support optimized merge)
Contributor
Author
There was a problem hiding this comment.
True, I'll remove the check
| } | ||
|
|
||
| /** Tracks state of one binary sub-reader that we are merging */ | ||
| private static class BinaryDocValuesSub extends DocIDMerger.Sub { |
Member
There was a problem hiding this comment.
This is copied from Lucene's DocValuesConsumer?
Contributor
Author
There was a problem hiding this comment.
Yes, except that it returns an anonymous subclass of TsdbDocValuesProducer instead of EmptyDocValuesProducer so that it can support merge stats.
| d.add(new SortedSetDocValuesField("tags", new BytesRef(tags[(i + j) % tags.length]))); | ||
| } | ||
|
|
||
| d.add(new BinaryDocValuesField("bytes_1", new BytesRef(tags[i % tags.length]))); |
Member
There was a problem hiding this comment.
maybe rename bytes_1 to tags_as_bytes?
Collaborator
💚 Backport successful
|
elasticsearchmachine
pushed a commit
that referenced
this pull request
Apr 24, 2025
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.
Applies the merge optimizations from #126499 and #126732 to binary field types for the ES819 codec.
Relates to #126111