poorbarcode commented on code in PR #21423:
URL: https://github.com/apache/pulsar/pull/21423#discussion_r1432940653
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java:
##########
@@ -359,6 +382,20 @@ public synchronized void readMoreEntries() {
}
}
+ private boolean shouldPauseOnAckStatePersist(ReadType readType) {
+ // Allows new consumers to consume redelivered messages caused by the
just-closed consumer.
+ if (readType != ReadType.Normal) {
+ return false;
+ }
+ if (!((PersistentTopic)
subscription.getTopic()).isDispatcherPauseOnAckStatePersistentEnabled()) {
+ return false;
Review Comment:
Thanks for mentioning me, I added a task named "part-4: Topic policies
support" in the `Motivation & Modifications`.
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java:
##########
@@ -456,17 +456,20 @@ public void markDeleteFailed(ManagedLedgerException
exception, Object ctx) {
private final DeleteCallback deleteCallback = new DeleteCallback() {
@Override
- public void deleteComplete(Object position) {
+ public void deleteComplete(Object context) {
if (log.isDebugEnabled()) {
- log.debug("[{}][{}] Deleted message at {}", topicName,
subName, position);
+ // The value of the param "context" is a position.
+ log.debug("[{}][{}] Deleted message at {}", topicName,
subName, context);
}
// Signal the dispatchers to give chance to take extra actions
- notifyTheMarkDeletePositionMoveForwardIfNeeded((PositionImpl)
position);
+ dispatcher.afterAckMessages(null, context);
Review Comment:
Fixed, thanks
--
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]