massakam opened a new pull request #5191: [Issue #5176][pulsar-broker] Fix bug 
that fails to search namespace bundle due to NPE
URL: https://github.com/apache/pulsar/pull/5191
 
 
   Fixes #5176
   
   ### Motivation
   
   As mentioned in #5176, NPE may occur in the load manager and fail to search 
for namespace bundles. This is because multiple threads may update a map named 
`brokerToNamespaceToBundleRange` at the same time.
   
   ### Modifications
   
   - Changed `brokerToNamespaceToBundleRange` to ConcurrentOpenHashMap instead 
of HashMap which is not thread safe.
   - Fixed `LoadManagerShared.removeMostServicingBrokersForNamespace()` logic 
so that NPE does not occur.
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to