You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/29 20:19:27 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #12243: PIP-45: Allow more info in MetadataSerde

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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org