You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/11/15 16:06:57 UTC

[GitHub] [pulsar] shibd commented on a diff in pull request #18478: [fix][client] Messages with inconsistent consumer epochs are not filtered when using batch receive and trigger timeout

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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org