-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fix][broker] Fix RoaringBitmap.contains
can't check value 65535
#20176
[fix][broker] Fix RoaringBitmap.contains
can't check value 65535
#20176
Conversation
RoaringBitmap.contains
can't check value 65535
Interesting, ConcurrentBitmapSortedLongPairSet also used the same method. |
Yeah, I'm not sure if our usage is wrong |
Codecov Report
@@ Coverage Diff @@
## master #20176 +/- ##
=============================================
+ Coverage 37.64% 72.89% +35.24%
- Complexity 12522 31963 +19441
=============================================
Files 1691 1868 +177
Lines 128933 138594 +9661
Branches 14061 15246 +1185
=============================================
+ Hits 48540 101026 +52486
+ Misses 74070 29531 -44539
- Partials 6323 8037 +1714
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Good to go. One comment that can be follow-up insight.
} | ||
|
||
for (long i = 1; i <= 100_000; i++) { | ||
assertTrue(roaringBitmap.contains(i, i + 1)); |
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.
nit: add description so that we know which i
fails instead of generic:
java.lang.AssertionError:
Expected :true
Actual :false
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.
Good to go. One comment that can be follow-up insight.
Merging... |
…pache#20176) (cherry picked from commit 2f9f5df) (cherry picked from commit edc3a6f)
@coderzc Please update the PR description with the impact of this bug. Here's my version of describing the impact: @codelipenghui @coderzc Is this the correct interpretation? |
@lhotari Yes, looks good to me. Thanks. |
As discussed on the mailing list https://lists.apache.org/thread/w4jzk27qhtosgsz7l9bmhf1t7o9mxjhp, there is no plan to release 2.9.6, so I am going to remove the release/2.9.6 label |
Motivation
RoaringBitmap/RoaringBitmap#623
MessageRedeliveryController uses the RoaringBitmap under the covers to track entryIds to redeliver.
The bug in RoaringBitmap (that has now been fixed) caused at least the case that the bit index 65535 couldn't be set.
The consequence of this would be that a message that should be redelivered doesn't get delivered and this could get Key_Shared subscriptions to get stuck. This could impact also other subscription types and cause a backlog to build up.
This bug was introduced in 2.10.2 with #17804 since that's when MessageRedeliveryController switched to use the RoaringBitmap based datastructure.
Modifications
RoaringBitmap
version to 0.9.44, this issue be fixed by PR (Verifying and fixing issue 623 RoaringBitmap/RoaringBitmap#624)RoaringBitmap.contains
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: