Minimize doc values fetches in TSDBSyntheticIdFieldsProducer#139053
Merged
tlrx merged 4 commits intoelastic:mainfrom Dec 5, 2025
Merged
Minimize doc values fetches in TSDBSyntheticIdFieldsProducer#139053tlrx merged 4 commits intoelastic:mainfrom
tlrx merged 4 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
Collaborator
|
Hi @tlrx, I've created a changelog YAML for you. |
fcofdez
approved these changes
Dec 5, 2025
Contributor
fcofdez
left a comment
There was a problem hiding this comment.
LGTM. Nice improvement 👍
| long docTimestamp; | ||
| firstDocID = docValues.skipDocIDForTimestamp(timestamp, firstDocID); | ||
| if (firstDocID != DocIdSetIterator.NO_MORE_DOCS) { | ||
| int nextDocID = firstDocID; |
Contributor
There was a problem hiding this comment.
nice improvement for the variable names
Member
Author
|
Thanks Francisco! |
tlrx
added a commit
to tlrx/elasticsearch
that referenced
this pull request
Dec 8, 2025
…#139053) When seeking for a synthetic _id term in TSDBSyntheticIdFieldsProducer we populate all the information required to build a SyntheticTerm instance, even if the term is never retrieved after seeking. Instead we can only track the current document ID and eventually the _tsid ordinal and timestamp values if those were fetched for seeking. The rest of the information (_tsid term, routing hash term) can be fetched on demand to build the synthetic _id term. # Conflicts: # server/src/main/java/org/elasticsearch/index/codec/tsdb/TSDBSyntheticIdFieldsProducer.java
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.
When seeking for a synthetic _id term in
TSDBSyntheticIdFieldsProducerwe populate all the information required to build aSyntheticTerminstance, even if the term is never retrieved after seeking.Instead we can only track the current document ID and eventually the _tsid ordinal and timestamp values if those were fetched for seeking. The rest of the information (_tsid term, routing hash term) can be fetched on demand to build the synthetic _id term.