rombert commented on a change in pull request #5: SLING-7544 - improving
optimized alias lookup to not block during int…
URL:
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/5#discussion_r176084452
##########
File path:
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
##########
@@ -127,7 +128,9 @@
private Map <String,List <String>> vanityTargets;
- private Map<String, Map<String, String>> aliasMap;
+ private volatile Map<String, Map<String, String>> aliasMap;
Review comment:
Two volatile flags don't ensure consistency. Either use a synchronized block
and non-volatile fileds or ensure thread safety in some other manner.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services