liangyepianzhou commented on code in PR #21423:
URL: https://github.com/apache/pulsar/pull/21423#discussion_r1435946350
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java:
##########
@@ -359,6 +382,41 @@ 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;
+ }
+ if (cursor == null) {
+ return true;
+ }
+
+ /**
+ * Double check for "Cursor data can be fully persistent".
+ * - Clear the marker that represent some acknowledgements were
executed.
+ * - Check whether dispatching should be paused due to cursor data is
too large to persistent.
+ * - If dispatching should be paused, but some acknowledgements have
been executed, re-calculate the result.
+ * - Mark delivery was paused at least once.
+ */
+ // Clear the marker that represent some acknowledgements were executed.
+
blockSignatureOnCursorDataCanNotFullyPersist.clearMakerNewAcknowledged();
Review Comment:
This is following the
[comment](https://github.com/apache/pulsar/pull/21423#discussion_r1435943914).
The original approach is fine.
--
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]