poorbarcode commented on code in PR #19581:
URL: https://github.com/apache/pulsar/pull/19581#discussion_r1114093804
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractBaseDispatcher.java:
##########
@@ -239,6 +240,21 @@ public int filterEntriesForConsumer(@Nullable
MessageMetadata[] metadataArray, i
// if actSet is null, use pendingAck ackSet
ackSet = positionInPendingAck.getAckSet();
}
+ // if the result of pendingAckSet(in
pendingAckHandle) AND the ackSet(in cursor) is empty
+ // filter this entry
+ if (isAckSetEmpty(ackSet)) {
+ entries.set(i, null);
+ entry.release();
+ continue;
+ }
+ } else {
+ // filter non-batch message in pendingAck state
+ if (positionInPendingAck.getLedgerId() ==
entry.getLedgerId()
+ && positionInPendingAck.getEntryId() ==
entry.getEntryId()) {
+ entries.set(i, null);
Review Comment:
`if (positionInPendingAck.getLedgerId() == entry.getLedgerId() &&
positionInPendingAck.getEntryId() == entry.getEntryId())`
This check is unnecessary, right?
--
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]