-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Prepare tsdb doc values format for merging optimizations. #125933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare tsdb doc values format for merging optimizations. #125933
Conversation
The change contains the following changes: * The numDocsWithField field moved from SortedNumericEntry to NumericEntry. Making this statistic always available. * Store jump table after values in writeField(...) Currently it is stored before storing values. This change will allow all the optimizations that are listed in elastic#125403
…denseRankPower metadata properties in the format to be after values metadata.
ece3a8f to
7597820
Compare
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
| entry.jumpTableEntryCount = meta.readShort(); | ||
| entry.denseRankPower = meta.readByte(); | ||
| private static void readNumeric(IndexInput meta, NumericEntry entry, int version) throws IOException { | ||
| if (version < ES87TSDBDocValuesFormat.VERSION_TWO) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these branches are far away, should we fork a new consumer and producer instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done: 378ee29
dnhatn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move ES87TSDBDocValuesConsumer to tests only and throw UOE in ES87TSDBDocValuesFormat#fieldsConsumer?
LGTM. Thanks Martijn!
Backporting elastic#125933 to 8.x branch. The change contains the following changes: - The numDocsWithField field moved from SortedNumericEntry to NumericEntry. Making this statistic always available. - Store jump table after values in ES87TSDBDocValuesConsumer#writeField(...). Currently it is stored before storing values. This will allow us later to iterate over the SortedNumericDocValues once. When merging, this is expensive as a merge sort on the fly is being executed. This change will allow all the optimizations that are listed in elastic#125403
) Backporting #125933 to 8.x branch. The change contains the following changes: - The numDocsWithField field moved from SortedNumericEntry to NumericEntry. Making this statistic always available. - Store jump table after values in ES87TSDBDocValuesConsumer#writeField(...). Currently it is stored before storing values. This will allow us later to iterate over the SortedNumericDocValues once. When merging, this is expensive as a merge sort on the fly is being executed. This change will allow all the optimizations that are listed in #125403
…5933) The change contains the following changes: - The numDocsWithField field moved from SortedNumericEntry to NumericEntry. Making this statistic always available. - Store jump table after values in ES87TSDBDocValuesConsumer#writeField(...). Currently it is stored before storing values. This will allow us later to iterate over the SortedNumericDocValues once. When merging, this is expensive as a merge sort on the fly is being executed. This change will allow all the optimizations that are listed in elastic#125403
The change contains the following changes:
numDocsWithFieldfield moved fromSortedNumericEntrytoNumericEntry. Making this statistic always available.ES87TSDBDocValuesConsumer#writeField(...). Currently it is stored before storing values. This will allow us later to iterate over theSortedNumericDocValuesonce. When merging, this is expensive as an merge sort on the fly is being executed.This change will allow all the optimizations that are listed in #125403
Note that most of the change is test code.