[Bug] ConcurrentBitmapSortedLongPairSet doesn't support pairs where the right value of the pair is larger than Integer.MAX_VALUE #23877
Labels
type/bug
The PR fixed a bug or issue reported a bug
Search before asking
Read release policy
Version
any released version
Minimal reproduce step
ConcurrentBitmapSortedLongPairSet uses internally RoaringBitmap which supports values up to 2^32.
Since ConcurrentBitmapSortedLongPairSet uses
Iterator<Integer>
in the implementation, it can only support values up to 2^31-1 (Integer.MAX_INTEGER
).What did you expect to see?
Since the class interface and name is about supporting a Long pair, it should support long values for both right and left values of the pair.
What did you see instead?
Long value is not supported for the right value of the pair.
Anything else?
A possible solution would be to replace org.roaringbitmap.RoaringBitmap with org.roaringbitmap.longlong.Roaring64Bitmap.
However, Roaring64Bitmap interface is slightly different and would result in other changes.
An alternative mitigation is to improve ConcurrentBitmapSortedLongPairSet to support values up to 2^32. That is implemented in PR #23878.
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: