-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Bit-packing works on blocks larger than 128 longs #137811
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
base: main
Are you sure you want to change the base?
Conversation
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
parkertimmins
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.
Been looking at the numeric compression lately, so went ahead and gave this a review. 😃
Just a couple of nits, logic looks correct.
server/src/main/java/org/elasticsearch/index/codec/tsdb/DocValuesForUtil.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/codec/tsdb/DocValuesForUtil.java
Outdated
Show resolved
Hide resolved
martijnvg
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.
This looks good Kostas 👍
I do have one question, can you both run the EncodeBenchmark and DecodeBenchmark micro benchmarks and check whether no regression was introduced by this change. I don't think so, but better be safe than sorry.
| private static final int BITPACK_BLOCK_SHIFT = 7; | ||
| private static final int BITBACK_BLOCK_SIZE = 1 << BITPACK_BLOCK_SHIFT; |
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.
Maybe turn this unto fields? And let both es87 and es819 doc values formats set this using their own block shift and size constants?
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.
This actually needs to be separated from the block sizes used in the es87 and es819. The only value that works here is 128.
Existing bit-packing logic is customized to apply to blocks of 128 longs. For larger blocks that are multiple of 128, the bit-packing logic is extended to be applied to blocks of size 128 iteratively. This is expected to be a no-op, since the codec block size is 128, but unlocks experimenting with larger blocks.
Related to #136307