leizhiyuan opened a new issue, #18196:
URL: https://github.com/apache/pulsar/issues/18196

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Version
   
   master
   
   ### Minimal reproduce step
   
   review the code
   
   <img width="795" alt="image" 
src="https://user-images.githubusercontent.com/2684384/197915334-bd273680-b3da-43f4-9405-6318ccfb5857.png";>
   
   
   
   ### What did you expect to see?
   
   ```
       public CompletableFuture<Void> removeOwnership(NamespaceBundle bundle) {
           ResourceLock<NamespaceEphemeralData> lock = 
locallyAcquiredLocks.get(bundle);
           if (lock == null) {
               // We don't own the specified bundle anymore
               return CompletableFuture.completedFuture(null);
           }
   
           return lock.release();
       }
   ```
   
   should be locallyAcquiredLocks.remove(bundle)
   
   ### What did you see instead?
   
   leak
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to