Repository navigation
Conversation
When site.absoluteurl is empty, the installer's bootstrap step and the registration of the first administrator now save it from that request (scheme, host, port and context path). InitFilter no longer stores a request-derived absolute URL for the whole application. Instead it makes each request's URL available on its own thread for the length of that request, and getAbsoluteContextURL() falls back to it only while site.absoluteurl is unset, logging a warning once. Page, feed, site-wide and planet output that used the request's URL is not added to the rendering caches. The request URL now uses the request's scheme and keeps non-default ports, so HTTPS sites get https:// links.
mraible
marked this pull request as ready for review
November 18, 2026 00:52
… admin's request While site.absoluteurl is unset, the page, feed, site-wide and planet caches now include the request's absolute URL in their keys instead of skipping the cache, so content built with one host name is only served to requests for that host name and caching keeps working. The first Roller UI request from a global administrator saves site.absoluteurl when it's still unset, which fills it in on sites upgraded without it.
This was referenced Nov 18, 2026
snoopdave
reviewed
Nov 18, 2026
snoopdave
left a comment
Contributor
There was a problem hiding this comment.
Review of 004413fce: The request-scoped URL and per-host cache keys address the main behavior. The twin has the same fix; its extra request wiring and bootstrap check reflect differences in the older branch. Two edge cases remain.
… only once A request now reads site.absoluteurl once, the first time it builds a link or a cache key, so its links and the key its content is cached under always agree even if an administrator sets the URL meanwhile. Content rendered outside a request isn't cached while the URL is unset, the cache warmup job skips its work until then, and the rendering caches are cleared when the URL is first saved. Saving the URL from setup or an administrator's request now uses compareAndSetProperty(), so when several requests try at once only the first one's URL is kept. Planet links also go through getAbsoluteContextURL() instead of reading the property directly.
While site.absoluteurl is unset, comment and approval notifications are still sent but leave out their links, since the only URL available is the host name of the request that caused them. Activation, invitation and pending entry emails exist to deliver a link, so they aren't sent: activation and invitation report why to the caller, and the pending entry notice logs a warning.
The planet sync task and the local feed fetcher store absolute links to each weblog. Until site.absoluteurl is set they can't build those links, so they skip their work instead of storing incomplete URLs.
The installer, the first administrator's registration and the first administrator request only save their URL as site.absoluteurl when its host looks like a public name. Loopback and private addresses, and host names without a dot such as localhost or a proxy's backend name, are left for an administrator to set under Server Administration > Configuration.
The log and error messages about an unset site URL now point to Server Admin > Configuration, matching the tab labels.
The planet sync task and local feed fetcher now wait for site.absoluteurl, so the test sets it, as a configured site would, and clears it afterwards.
Contributor
Author
|
A second review raised a few more points, now addressed in the latest commits:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
site.absoluteurlis empty, the installer's bootstrap step and the registration of the first administrator save it from that request (scheme, host, port and context path).InitFilterno longer stores a request-derived absolute URL for the whole application. It makes each request's URL available on its own thread for that request only, andgetAbsoluteContextURL()falls back to it whilesite.absoluteurlis unset, logging a warning once. A request readssite.absoluteurlonce, the first time it builds a link or a cache key, so its links and the key its content is cached under agree even if an administrator sets the URL meanwhile. Planet links go throughgetAbsoluteContextURL()too.site.absoluteurlis unset, the page, feed, site-wide and planet caches include the request's URL in their keys, so content built for one host name is only served to requests for that host name, and caching keeps working. Content rendered outside a request isn't cached, the cache warmup job waits, and the rendering caches are cleared when the URL is first saved.site.absoluteurlwhen it's still unset, so a site upgraded without it fills it in the first time an admin opens Roller.localhostor a proxy's backend name, are left for an administrator to set under Server Admin > Configuration, which the log and error messages point to.compareAndSetProperty(), so when several requests try at once only the first one's URL is kept.https://links.InitFilter.initializedis volatile.What changes for an existing site with an empty
site.absoluteurl(new installs set it at setup): until an administrator opens the Roller UI at a public host name or sets the URL, pages link to each request's own host and are cached per host name, and emails and background work behave as above.Performance, measured on a copy of a production site (77 public addresses, Tomcat behind httpd, same WAR for both arms): with
site.absoluteurlset and with it empty, repeat requests had the same median (1.5 ms) and throughput at 10 clients was 2,779 and 2,909 requests/second, with the same CPU. An earlier version that didn't cache while the setting was empty was about 5x slower (8.5 ms median, 566 requests/second). The same test confirmed that two host names get their own cached copies and that the first admin page view saves the https URL.Tests:
InitFilterTest(rewritten to go throughdoFilter, with per-host caching cases),RegisterSiteUrlTest,SiteUrlForAdminTest(including local and private hosts),SiteUrlWhileUnsetTest,MailUtilSiteUrlTest,PlanetSiteUrlTest, newInstallTestandPropertiesTestcases, andPlanetManagerLocalTestnow sets the URL as a configured site would.mvn testpasses, and the Playwright database-login suite passes.The CHANGES entry is in #324.