geosolutions-it / geoserver

Official GeoServer repository
http://geoserver.org
Other
10 stars 7 forks source link

ImageMosaic plugin layer if deleted, deletes whole database #327

Open afabiani opened 2 years ago

afabiani commented 2 years ago

Accordingly to this methos here it looks like a drop call to the ImageMosaic store will end up dropping the whole DB.

E.g.: a rest call like this http://localhost:8080/geoserver/rest/workspaces/geonode/coveragestores/optimized.xml?purge=all&recurse=true will force the plugin to DROP the whole DB defined into the datastore.properties file

This might be a big issue whenever we are going to use the same DB to store more than one dataset. In this specific case we will end up dropping all the data withing a single rest call.

giohappy commented 2 years ago

@aaime can we do a time boxed investigation of this?

aaime commented 2 years ago

Right now I'm a "bit" under pressure (a few ongoing tickets plus preparing a brand new 8 hours training for next week...). Anyone else that could have a look?

giohappy commented 2 years ago

There's no particular urgency, although it looks quite severe.

aaime commented 2 years ago

Idea: switch to remote only table, maybe add parameter to control removing database too? But it requires a GeoTools StructuredGridCoverageReader API change.

afabiani commented 2 years ago

No problems on our side to update the api calls actually.

aaime commented 2 years ago

Updated my comment, I meant at the GeoTools level.

giohappy commented 2 years ago

@afabiani?

afabiani commented 2 years ago

No problem either, we will include the new geotools on the package.

giohappy commented 2 years ago

@nmco this issue isn't connected to any project, but I think it is worth the effort given its severity (not only for GeoNode). Do you think we should proceed with the fix?

afabiani commented 2 years ago

JIRA issue for reference here