lhotari opened a new pull request #11820:
URL: https://github.com/apache/pulsar/pull/11820


   ### Motivation
   
   - since `java.util.HashMap` is used, there is a potential issue that the 
datastructure gets corrupted.
   There is existing code that gives the impression that the producer cache is 
used by multiple threads. 
   For example:
   
https://github.com/apache/pulsar/blob/4046a6f9b73d635773c8696a8b9f28be1ce226cc/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java#L551-L559
   
   ### Modifications
   
   use ConcurrentHashMap instead of HashMap for caching producers in 
ContextImpl class.
   


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