-
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][client] Messages with inconsistent consumer epochs are not filtered when using batch receive and trigger timeout #18478
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18478 +/- ##
============================================
+ Coverage 47.15% 47.21% +0.06%
- Complexity 10432 10440 +8
============================================
Files 697 698 +1
Lines 68023 67986 -37
Branches 7284 7271 -13
============================================
+ Hits 32074 32101 +27
+ Misses 32367 32306 -61
+ Partials 3582 3579 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
23fb813
to
07cd25c
Compare
clearIncomingMessages(); | ||
unAckedMessageTracker.clear(); | ||
int currentSize; | ||
synchronized (incomingQueueLock) { |
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.
It seems that locks still need to be used. if use share sub, may we don't need this lock.
Original comment: #17318 (comment)
Related modifications: f2d6b47
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.
Thanks
/pulsarbot run-failure-checks |
@Technoboy- Please help resolve the conflicts |
…g batch receive and trigger timeout
e2ddd2c
to
61cff54
Compare
Done |
incomingQueueLock.lock(); | ||
try { | ||
if (canEnqueueMessage(message) && incomingMessages.offer(message)) { |
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.
add lock but don't check the epoch, it also can't filter the message that the epoch is smaller than the current epoch, right? @Technoboy- @codelipenghui
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.
+1, here need add judge isValidConsumerEpoch(message)
…ered when using batch receive and trigger timeout (apache#18478)
Motivation
The original patch is #17318. Revert by #18475
Messages with inconsistent consumer epochs are not filtered when using batch receive and trigger timeout.
Modifications
notifyPendingBatchReceivedCallBack
.notifyPendingBatchReceivedCallBack
logic.Verifying this change
testBatchReceiveRedeliveryAddEpoch
unit test covers the scene.Documentation
doc-not-needed