DominikSuess 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_r176097092
##########
File path:
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
##########
@@ -189,10 +192,15 @@ protected void doInit() {
final Map<String, List<MapEntry>> newResolveMapsMap = new
ConcurrentHashMap<>();
+ isAliasMapInitialized = false;
//optimization made in SLING-2521
if (this.factory.isOptimizeAliasResolutionEnabled()) {
- final Map<String, Map<String, String>> aliasMap =
this.loadAliases(resolver);
- this.aliasMap = aliasMap;
+ new Thread(new Runnable(){
Review comment:
@rombert - the thread at the moment would afair simply complete - certainly
quickly starting and stopping would let threads pile up - so I'll capture the
thread reference and interrupt in close() while making the class AutoClosable
(everything else seems to be overly complicated for a rather virtual case).
----------------------------------------------------------------
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