rombert commented on issue #7: SLING-7544 - fixing potential race between intialization and addition… URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/7#issuecomment-394481648 Thanks for the patch @DominikSuess . Based on our offline discussions I now understand the problem and the fix. Reviewing the code I think that we could better reuse the existing lock structure, rather than create new locks and maps. In case of a 'sync' start the `initializing` lock protects the internal `aliasMap` and does not allow change events to update it. I think the simplest way of solving it is to delay the unlocking of `initializing` until the 'async' loading is complete as well. By looking at the query methods it does not look like it would block them, so we would not break anything. Would this work for you?
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services