Skip to content

Disk quota: skip the startup cache traversal for stores that do not track usage - #1615

Open
aaime wants to merge 1 commit into
GeoWebCache:mainfrom
aaime:quotastore_skip_trackers
Open

aaime wants to merge 1 commit into
GeoWebCache:mainfrom
aaime:quotastore_skip_trackers

Conversation

@aaime

@aaime aaime commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

At startup, DiskQuotaMonitor traverses the cache of every layer whose saved usage is zero, to compute it (assuming they are new/untracked). A quota store that discards usage (like DummyQuotaStore in GeoServer) reports zero for every layer, so the monitor walks the whole tile cache and then throws the result away. GeoServer installs that store while the disk quota is disabled, which is the default. On a large cache on network storage the traversal takes hours of CPU and file system load, and it runs again at every disk quota save and every GWC reload.

In this PR, QuotaStore gets a default method, tracksUsage(), that returns true. When the store returns false, the monitor skips the traversal. The BDB and JDBC stores keep the default, so standalone GWC behaves as before
with the quota disabled it still records usage, as the disk quota documentation describes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant