This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 9d767b3d81d [fix][client] Fix memory leak in ClientCnx.newLookup when
there's TooManyRequestsException (#23971)
9d767b3d81d is described below
commit 9d767b3d81da7d9d8bdb4d72098f0b1243c9c9f7
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 b8caa0f4383..675fa206347 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
@@ -859,6 +859,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);
}