merlimat commented on a change in pull request #12243:
URL: https://github.com/apache/pulsar/pull/12243#discussion_r718854182



##########
File path: 
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/coordination/impl/CoordinationServiceImpl.java
##########
@@ -80,6 +81,12 @@ public void close() throws Exception {
                 k -> new LockManagerImpl<T>(store, clazz, executor));
     }
 
+    @Override
+    public <T> LockManager<T> getLockManager(MetadataSerde<T> serde) {
+        return (LockManager<T>) lockManagers.computeIfAbsent(serde,

Review comment:
       Oh, I didn't think of that. The thing is that the caching of the 
instances of `LockManager` is not very useful in practice (since we mostly call 
it once..). It was just there to have a collection of instances to close when 
we close the LockManager. In that light, the current approach could be "fine". 




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