lhotari commented on a change in pull request #12456:
URL: https://github.com/apache/pulsar/pull/12456#discussion_r734392445



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
##########
@@ -409,17 +410,18 @@ private void resumeReceivingFromPausedConsumersIfNeeded() 
{
     protected CompletableFuture<Message<T>> internalReceiveAsync() {
         CompletableFutureCancellationHandler cancellationHandler = new 
CompletableFutureCancellationHandler();
         CompletableFuture<Message<T>> result = 
cancellationHandler.createFuture();
-        Message<T> message = incomingMessages.poll();
-        if (message == null) {
-            pendingReceives.add(result);
-            cancellationHandler.setCancelAction(() -> 
pendingReceives.remove(result));
-        } else {
-            decreaseIncomingMessageSize(message);
-            checkState(message instanceof TopicMessageImpl);

Review comment:
       @michaeljmarshall I would keep that change to another PR since it's 
better to just do the change in this PR that fixes the data race. The class 
contains similar checks in other locations and if those checks are removed, 
that change should be consist and complete.




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