Skip to content

Conversation

@kkrik-es
Copy link
Contributor

@kkrik-es kkrik-es commented Nov 10, 2025

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

@kkrik-es kkrik-es marked this pull request as ready for review November 10, 2025 13:34
@kkrik-es kkrik-es added the test-full-bwc Trigger full BWC version matrix tests label Nov 10, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

Copy link
Contributor

@parkertimmins parkertimmins left a 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.

Copy link
Member

@martijnvg martijnvg left a 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.

Comment on lines 25 to 26
private static final int BITPACK_BLOCK_SHIFT = 7;
private static final int BITBACK_BLOCK_SIZE = 1 << BITPACK_BLOCK_SHIFT;
Copy link
Member

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?

Copy link
Contributor Author

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.

@kkrik-es kkrik-es removed the test-full-bwc Trigger full BWC version matrix tests label Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants