codelipenghui commented on code in PR #21423:
URL: https://github.com/apache/pulsar/pull/21423#discussion_r1432583611


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java:
##########
@@ -123,6 +123,13 @@ public class PersistentDispatcherMultipleConsumers extends 
AbstractDispatcherMul
     protected final ExecutorService dispatchMessagesThread;
     private final SharedConsumerAssignor assignor;
 
+    /**
+     * Delivery was paused at least once in the earlier time, due to the 
cursor data can not fully persist.
+     * Note: do not use this field to confirm whether the delivery should be 
paused,
+     *       please call {@link #shouldPauseOnAckStatePersist}.
+     */
+    private volatile boolean pausedDueToCursorDataCanNotFullyPersist = false;

Review Comment:
   We have two parts will update this field
   
   1. readMoreEntries()
   2. afterAckMessages()
   
   But they are different threads? even if we have `synchronized` for the 
`readMoreEntries()` method. But the `afterAckMessages()` method will not 
acquire the same lock?



-- 
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]

Reply via email to