shibd commented on code in PR #18478:
URL: https://github.com/apache/pulsar/pull/18478#discussion_r1022985030


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -1917,17 +1884,21 @@ public void redeliverUnacknowledgedMessages() {
             }
 
             // clear local message
-            int currentSize = 0;
-            currentSize = incomingMessages.size();
-            clearIncomingMessages();
-            unAckedMessageTracker.clear();
+            int currentSize;
+            synchronized (incomingQueueLock) {

Review Comment:
   It seems that locks still need to be used. if use share sub, may we don't 
need this lock.
   
   Original comment: 
https://github.com/apache/pulsar/pull/17318#discussion_r977591244
   
   Related modifications: 
https://github.com/apache/pulsar/pull/17318/commits/f2d6b47494314517e527425726013b1959575d93



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