eolivelli commented on issue #10210:
URL: https://github.com/apache/pulsar/issues/10210#issuecomment-818509839


   My understanding is that:
   - in ClientCnx#sendGetSchema we call `sendGetRawSchema`() and it returns a 
CompletableFuture 
   
(https://github.com/apache/pulsar/blob/c9c116767235491aca6f27ef7a07705666bbd647/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java#L879)
   - in PulsarDecoder we receive the response from the server  and call 
ClientCnx#handleGetSchemaResponse ( 
https://github.com/apache/pulsar/blob/c12765a0530bcefca8e840d2f8f43383d7478778/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/PulsarDecoder.java#L350
 )
   - in PulsarDecoder we execute the "finally" block that `release` the ByteBuf 
that holds the message 
   - in ClientCnx#sendGetSchema  we enter the lambda function attached with 
"thenCompose" to the initial CF 
(https://github.com/apache/pulsar/blob/c9c116767235491aca6f27ef7a07705666bbd647/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java#L891)
 but it is too late
   
   I saw this problem happening on CI, so the thread ClientCnx may have been so 
slow that it was possible for the "finally" block to be executed   


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