vyommani opened a new pull request, #950:
URL: https://github.com/apache/ranger/pull/950

   
   
   ## What changes were proposed in this pull request?
   
   Switched Delegate from lazy computeIfAbsent to eager initialization in the 
constructor. All internal maps are now fully populated and wrapped with 
unmodifiableMap before the Delegate is published to the cache.
   
   This eliminates the CME because HashMap.get() is thread-safe for concurrent 
reads when there are no writes. The previous computeIfAbsent caused concurrent 
writes on a shared HashMap when multiple threads accessed the same cached 
Delegate, which parallelStream exposed
   
   
   ## How was this patch tested?
   
   after fix mvn test -Dtest=TestPolicyACLs#testResourceACLs_dataMask is 
passing.
   


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