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 2021/04/15 10:59:29 UTC

[GitHub] [pulsar] linlinnn commented on a change in pull request #10240: [consumer] fix order guarantee for MultiTopicsConsumerImpl

linlinnn commented on a change in pull request #10240:
URL: https://github.com/apache/pulsar/pull/10240#discussion_r613970165



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
##########
@@ -407,21 +407,19 @@ public UnAckedMessageTracker getUnAckedMessageTracker() {
     protected CompletableFuture<Message<T>> internalReceiveAsync() {
         CompletableFutureCancellationHandler cancellationHandler = new CompletableFutureCancellationHandler();
         CompletableFuture<Message<T>> result = cancellationHandler.createFuture();
-        Message<T> message = null;
+
         try {
-            message = incomingMessages.poll(0, TimeUnit.MILLISECONDS);
+            reentrantLock.lock();

Review comment:
       @eolivelli Thanks for your suggestion, could you explain a little bit?




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

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