Jackie-Jiang opened a new pull request, #20203: URL: https://github.com/apache/pinot/pull/20203
## Summary `OffHeap32BitSet`, `OffHeap64BitSet` and `OffHeap128BitSet` allocate their serialized bytes as `Integer.BYTES + size << N`. Java parses that as `(Integer.BYTES + size) << N`, so every serialized `DISTINCTCOUNTOFFHEAP` intermediate result ends in 12, 28 or 60 zero bytes that nothing reads. This change allocates `Integer.BYTES + (size << N)` instead. The format stays compatible across versions. Each `deserialize` reads the size header and then exactly `size` entries, so a broker or server reads payloads with and without the trailing bytes alike. `OffHeapSetTest` now checks the exact serialized length of each set. Before the fix it fails for all three set types: for example, the 32-bit set expects 35368 bytes and gets 35380. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
