lhotari opened a new pull request #10066:
URL: https://github.com/apache/pulsar/pull/10066


   ### Motivation
   
   In the existing solution there's a memory leak that occurs when a lookup 
request doesn't receive a reply.
   The timeout handling doesn't remove the lookup request's future from pending 
requests.
   
   
https://github.com/apache/pulsar/blob/9db880eddb4bcd4478e24d5161ec022991cd5da7/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java#L615-L621
   
   ### Modifications
   
   There's a common way to handle request timeouts in ClientCnx class . 
However, this method wasn't used for lookup requests.
   This PR makes changes in lookup request timeout handling to use the common 
way which uses the `requestTimeoutQueue` based solution.
   Another modification is to use `System.nanoTime()` for calculating elapsed 
time since `System.currentTimeMillis()` is not a stable way to calculate 
elapsed time. 


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