Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport] Fix GWC not storing tiles on disk when using pgconfig catalog backend #451

Merged
merged 1 commit into from Apr 19, 2024

Conversation

groldan
Copy link
Member

@groldan groldan commented Apr 19, 2024

When using the pgconfig catalog backend, it replaces the default GWC tile layer catalog with a specialized one to store the tile layers config directly on the database instead of going through the resource store.

To do so, it has to exclude the GWCInitializer bean, as it depends on a TileLayerCatalog.

By doing so, we missed the call to
ConfigurableBlobStore.setChanged(...), resulting in the ConfigurableBlobStore decorator never having its configured flag set to true, and hence never calling the actual BlobStore's put(TileObject) method.

This patch introduces PgsqlGwcInitializer as a replacement for the default GWCInitializer, which takes care of that and also listens to TileEvents to maintain the non-memory-cacheable list of layers in sync at org.geowebcache.storage.blobstore.memory.CacheProvider.

When using the `pgconfig` catalog backend, it replaces the default GWC
tile layer catalog with a specialized one to store the tile layers
config directly on the database instead of going through the resource
store.

To do so, it has to exclude the `GWCInitializer` bean, as it depends on
a `TileLayerCatalog`.

By doing so, we missed the call to
`ConfigurableBlobStore.setChanged(...)`, resulting in the
`ConfigurableBlobStore` decorator never having its `configured` flag set
to true, and hence never calling the actual `BlobStore`'s
`put(TileObject)` method.

This patch introduces `PgsqlGwcInitializer` as a replacement for the
default `GWCInitializer`, which takes care of that and also listens to
`TileEvents` to maintain the non-memory-cacheable list of layers in
sync at `org.geowebcache.storage.blobstore.memory.CacheProvider`.
@groldan groldan added the bug Something isn't working label Apr 19, 2024
@groldan groldan merged commit 6586273 into geoserver:1.7.x Apr 19, 2024
1 check passed
@groldan groldan deleted the fix/gwc_cache_dir_1.7.x branch April 19, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant