[Geoserver-devel] [JIRA] (GEOS-9761) Catalog points to resource objects, which in turn, point to a different catalog instance

Andrea Aime created an issue

GeoServer / BugGEOS-9761

Catalog points to resource objects, which in turn, point to a different catalog instance

Issue Type:

BugBug

Assignee:

Andrea Aime

Components:

Main

Created:

07/Oct/20 12:32 PM

Priority:

MediumMedium

Reporter:

Andrea Aime

Looking at object references today, one can see the catalog pointing to a catalog facade, which in turn
refers to the actual CatalogInfo. Some of them, like StoreInfoImpl and ResourceInfoImpl, refer back to a catalog. However, it’s not the same catalog pointing at them, but the temporary one created during the load process: the main catalog is fixed, referred by Spring, a secondary instance is created and loaded, and then the two are synched.

The issue was probably (re?-)introduced as a side effect of the isolated catalog work. The fast path for synch two DefaultCatalogFacade objects takes care of catalog references, but nowadays the syncTo gets a reference to an IsolatedCatalog instance, skipping the optimized copy path.
The non optimized copy path instead just loads objects, but fails to re-adjust the catalog references.

All in all this should not be causing leaks per se, but may well cause non obvious mis-behaviors in code that uses the resources’s “getCatalog” method instead of relying of the one available in Spring.

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#100148-sha1:19001a3)

Atlassian logo