You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2023/12/04 01:43:06 UTC

(pulsar) branch master updated: [fix][broker] Fix lookupRequestSemaphore leak when topic not found (#21646)

This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 991a95421b4 [fix][broker] Fix lookupRequestSemaphore leak when topic not found (#21646)
991a95421b4 is described below

commit 991a95421b454602b26571fd002805eae3bdc039
Author: pengxiangrui127 <67...@users.noreply.github.com>
AuthorDate: Mon Dec 4 09:42:59 2023 +0800

    [fix][broker] Fix lookupRequestSemaphore leak when topic not found (#21646)
---
 .../main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java
index 1d984409fe7..c4a39cd0d44 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java
@@ -132,10 +132,10 @@ public class TopicLookupBase extends PulsarWebResource {
                             pulsar().getBrokerService().getLookupRequestSemaphore().release();
                             return result.getLookupData();
                         }
-                    }).exceptionally(ex->{
-                        pulsar().getBrokerService().getLookupRequestSemaphore().release();
-                        throw FutureUtil.wrapToCompletionException(ex);
                     });
+                }).exceptionally(ex -> {
+                    pulsar().getBrokerService().getLookupRequestSemaphore().release();
+                    throw FutureUtil.wrapToCompletionException(ex);
                 });
     }