Skip to content

PYR1-1799 Omit empty GWC extents from tile-layer PUTs - #103

Merged
lambdatronic merged 1 commit into
mainfrom
PYR1-1799-omit-empty-gwc-extent
Sep 24, 2026
Merged

lambdatronic merged 1 commit into
mainfrom
PYR1-1799-omit-empty-gwc-extent

Conversation

@danielhvs

@danielhvs danielhvs commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Purpose

Stop GeoSync from sending an empty <extent> in GWC tile-layer PUTs. On dev, fire-detections_active-fires and fire-detections_firis-perimeters failed registration on every run with a GWC 500, so the 1x1 metatile from #102 never landed and those layers stayed at metaWidthHeight [4, 4].

Cause

A tile layer that GeoServer creates itself has grid subsets with only a gridSetName, which means full gridset coverage. Live on geoserver-dev:

"gridSubsets": [{"gridSetName": "EPSG:4326"}, {"gridSetName": "EPSG:900913"}]

Both PUT builders copied those subsets back and always wrote <extent><coords></coords></extent>. GWC then fails to hash the empty bounding box:

java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
    at org.geowebcache.grid.BoundingBox.hashCode(BoundingBox.java:267)
    at org.geowebcache.config.XMLGridSubset.hashCode(XMLGridSubset.java:157)

Changes

  1. update-cached-layer and update-cached-layer-metatiling write <extent> only when the subset has coords
  2. Tests cover both builders with subsets that have no extent, and check that coords are still written when present

update-cached-layer is the raster TIME-filter path, and it had this bug before #102. It is behind the utility fire-weather-forecast_ecmwf_* registration failures on dev, which also appear before #102 was deployed.

Verified on dev

Both dev GeoSync UberJARs were built from 0a6bdc2, and I ran the syncs by hand:

  1. sync-fire-detections on geoserver-dev: 0 registration failures, down from 2 on 3af114a (active-fires, firis-perimeters)
  2. All 12 fire-detections_{active-fires,firis-perimeters,fire-history} tile layers now report metaWidthHeight [1, 1] and keep both grid subsets
  3. geoserver01 log: 0 ArrayIndexOutOfBoundsException since the jar swap
  4. sync-fire-weather-forecast on geoserver-utility-dev: fire-weather-forecast_ecmwf_20260924_00 returns status 0, Workspace updated. It failed 4 times earlier today

Related Issues

Closes PYR1-1799
Relates to PYR1-1786

GeoServer-created tile layers carry grid subsets with only a gridSetName.
update-cached-layer and update-cached-layer-metatiling copied them back as
<extent><coords></coords></extent>, and GWC threw
ArrayIndexOutOfBoundsException in BoundingBox.hashCode, failing the PUT with a
500. Write the extent only when the subset has coords.
@danielhvs
danielhvs marked this pull request as ready for review September 24, 2026 14:53
@lambdatronic
lambdatronic merged commit 73f5f0a into main Sep 24, 2026
1 check passed
@lambdatronic
lambdatronic deleted the PYR1-1799-omit-empty-gwc-extent branch September 24, 2026 14:59
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.

2 participants