lhotari commented on code in PR #18928:
URL: https://github.com/apache/pulsar/pull/18928#discussion_r1049358007


##########
pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawReaderImpl.java:
##########
@@ -203,12 +232,17 @@ public CompletableFuture<Void> seekAsync(MessageId 
messageId) {
 
         @Override
         public CompletableFuture<Void> closeAsync() {
+            CompletableFuture<Void> closeFuture = super.closeAsync();
             reset();
-            return super.closeAsync();
+            return closeFuture;

Review Comment:
   Yes, that's true. Pulsar contains a lot of such race conditions. I wonder if 
it's worth fixing that one, since it would add complexity to the code. There 
are multiple of such race conditions in ConsumerBase's closeAsync method. The 
fix would have to be done there. The problem is more severe in ConsumerBase 
since it can impact the memory limit controller. I'll create a separate issue 
to track the issue.



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