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/08/30 19:32:58 UTC

[GitHub] [pulsar] lhotari commented on pull request #11820: [Functions] ConcurrentHashMap should be used for caching producers

lhotari commented on pull request #11820:
URL: https://github.com/apache/pulsar/pull/11820#issuecomment-908629312


   > LGTM. One question: wouldn't it also make sense to modify the `get` and `putIfAbsent` logic to instead use `computeIfAbsent` on this concurrent hashmap? That would prevent the unnecessary creation of the `newProducer` that currently gets closed if another thread created an equivalent producer.
   
   yes, that's a valid point. It would be good to do that in a separate PR since the current logic should work as long as a ConcurrentHashMap is used. @michaeljmarshall  Would you like to create a PR for that improvement?


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