This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-3.3 by this push:
new 558edd1866b [fix][client] Fix memory leak in ClientCnx.newLookup when
there's TooManyRequestsException (#23971)
558edd1866b is described below
commit 558edd1866bfde84cc4b12c961ff342dd93438dc
Author: Lari Hotari <[email protected]>
AuthorDate: Thu Feb 13 01:29:54 2025 +0200
[fix][client] Fix memory leak in ClientCnx.newLookup when there's
TooManyRequestsException (#23971)
---
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java | 1 +
1 file changed, 1 insertion(+)
diff --git
a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
index 302aba28ee8..5f26f90b206 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
@@ -927,6 +927,7 @@ public class ClientCnx extends PulsarHandler {
if (maxLookupRequestSemaphore.tryAcquire()) {
waitingLookupRequests.add(Pair.of(requestId, Pair.of(request,
future)));
} else {
+ request.release();
if (log.isDebugEnabled()) {
log.debug("{} Failed to add lookup-request into waiting
queue", requestId);
}