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



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java
##########
@@ -733,9 +821,11 @@ private void pendingBatchReceiveTask(Timeout timeout) 
throws Exception {
                 if (diff <= 0) {
                     // The diff is less than or equal to zero, meaning that 
the batch receive has been timed out.
                     // complete the OpBatchReceive and continue to check the 
next OpBatchReceive in pendingBatchReceives.
-                    OpBatchReceive<T> op = pendingBatchReceives.poll();
-                    completeOpBatchReceive(op);
-                    firstOpBatchReceive = pendingBatchReceives.peek();
+                    OpBatchReceive<T> op = pollNextBatchReceive();
+                    if (op != null) {
+                        completeOpBatchReceive(op);
+                    }

Review comment:
       this seems to fix #8307




----------------------------------------------------------------
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:
[email protected]


Reply via email to