Skip to content

Commit

Permalink
SLING-12636: Resource Resolver: add test coverage for background init…
Browse files Browse the repository at this point in the history
… - fix MapEntries internal state when loadVanityPaths is called a second time
  • Loading branch information
reschke committed Jan 27, 2025
1 parent 4df109b commit ea037cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1166,8 +1166,10 @@ protected void initializeVanityPaths() throws IOException {
this.initializing.lock();
try {
if (this.factory.isVanityPathEnabled()) {
vanityPathsProcessed.set(false);
this.vanityBloomFilter = createVanityBloomFilter();
VanityPathInitializer vpi = new VanityPathInitializer(this.factory);

if (this.factory.isVanityPathCacheInitInBackground()) {
this.log.debug("bg init starting");
Thread vpinit = new Thread(vpi, "VanityPathInitializer");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ private void waitForBgInit() {

// get vanity paths (after waiting for bg init to complete)
private void initializeVanityPaths() throws IOException {
getVanityPathsProcessed().set(false);
mapEntries.initializeVanityPaths();
waitForBgInit();
}
Expand Down

0 comments on commit ea037cd

Please sign in to comment.