[Geoserver-devel] [JIRA] (GEOS-10561) CatalogImpl.save(StoreInfo) business rule to handle ResourceInfo.namespace

Gabriel Roldan created an issue

GeoServer / ImprovementGEOS-10561

CatalogImpl.save(StoreInfo) business rule to handle ResourceInfo.namespace

Issue Type:

ImprovementImprovement

Assignee:

Gabriel Roldan

Created:

26/Jun/22 11:11 PM

Priority:

MediumMedium

Reporter:

Gabriel Roldan

CoverageStoreEditPage and DataStoreEditPage duplicate code
for a poor job trying to maintain the consistency between a
StoreInfo workspaces and its children ResourceInfo namespace
properties.

Going through, and saving all the StoreInfo’s resources disregarding
whether the store has been assigned a different workspace doesn’t only
waste resources and slows down the update store operations in both
web and rest, but produce as many update events as resources in the
store, which are no-ops, but can trigger unnecessary side effects
from catalog listeners.

Keeping the resources namespace in sync with their store’s workspace
is clearly a Catalog business rule instead.

Remove the duplicate eager resource update code from CoverageStore
and DataStore edit pages, and implement the consistency enforcement
as a Catalog.save(StoreInfo) business rule, avoiding going through
the list of child resources if not needed, and ensuring the operation
is rolled back with counter-actions if anything fails.

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100201-sha1:00501c8)

Atlassian logo