joerghoh commented on code in PR #191: URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/191#discussion_r2282288126
########## src/main/java/org/apache/sling/resourceresolver/impl/mapping/AliasHandler.java: ########## @@ -200,61 +202,60 @@ private void execute() { */ @NotNull private Map<String, Map<String, Collection<String>>> loadAliases( - @Nullable List<String> conflictingAliases, @Nullable List<String> invalidAliases) { + @NotNull ResourceResolver resolver, + @Nullable List<String> conflictingAliases, + @Nullable List<String> invalidAliases, + @NotNull StringBuilder diagnostics) { Map<String, Map<String, Collection<String>>> map = new ConcurrentHashMap<>(); - try (ResourceResolver resolver = - factory.getServiceResourceResolver(factory.getServiceUserAuthenticationInfo(SERVICE_USER))) { Review Comment: You are no longer opening a RR here, which RR do you use instead? ########## src/main/java/org/apache/sling/resourceresolver/impl/mapping/AliasHandler.java: ########## @@ -129,7 +129,13 @@ protected void initializeAliases() { // optimization made in SLING-2521 if (this.factory.isOptimizeAliasResolutionEnabled()) { AliasInitializer ai = new AliasInitializer(); - ai.run(); + if (this.factory.isAliasCacheInitInBackground()) { + this.log.debug("bg init starting"); Review Comment: ```starting alias initialization in the background``` ########## src/test/java/org/apache/sling/resourceresolver/impl/mapping/AliasMapEntriesTest.java: ########## @@ -154,6 +162,22 @@ public void tearDown() throws Exception { mockCloser.close(); } + private void waitForBackgroundInitReady() { Review Comment: maybe ```waitForBackgroundinitCompleted```? -- 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: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org