Opened 9 years ago

Last modified 8 years ago

#1257 closed defect

SECORE_Update Secoredb by update scripts — at Version 9

Reported by: Vlad Merticariu Owned by:
Priority: major Milestone: 9.3
Component: secore Version: development
Keywords: Cc: Dimitar Misev, Bang Pham Huu
Complexity: Medium

Description (last modified by Bang Pham Huu)

From Dimitar's revision, so we can make a UpdateSecore handler which will get the request based on file names (insert, delete) and each file contain a single CRS:

1-insert: will add a new CRS definition (e.g. UnixTime) and the handler class will insert it to the BaseX database. It will contain full valid XML for the CRS definition.
2-delete: don't need the GML, just list a single gml:id, example: crs/OGC/0/UnixTime

We don't have any place to store userdb update version yet. The latest update version will be stored in BaseX (in some way..). On startup, secore will automatically read the version:

+ if no version exists, then it runs the updates and stores the latest version
+ if a version exists, then it reads the version, checks if it equals the last update version; if it doesn't equal then it runs the updates and stores the latest version

The updates (each file is a new version) (1-delete, 2-insert, …) should be stored somewhere. $RMANHOME/share/rasdaman/secore would be a good place.

With these changes, user defined CRSs can be kept and we can adjust rasdaman CRSs from userdb simultaneously.

Change History (11)

by Vlad Merticariu, 9 years ago

Attachment: UnixTime_old.xml added

by Vlad Merticariu, 9 years ago

Attachment: UnixTime.xml added

comment:1 by Vlad Merticariu, 9 years ago

Cc: Dimitar Misev Bang Pham Huu added

comment:2 by Bang Pham Huu, 9 years ago

The problem will appear in Enterprise but not in rasdaman Community.

comment:3 by Dimitar Misev, 9 years ago

Same with the TemporalDatum, looks like some problem with the substition when flattening definitions.

comment:4 by Dimitar Misev, 9 years ago

I'm guessing Bang the upgrade issue comes from your recent secore patches. Do you maybe have a suggestion how to best perform the upgrade automatically?

Currently the fix is to remove webapps/secoredb and restart tomcat so that secore's database is recreated from scratch.

Last edited 9 years ago by Dimitar Misev (previous) (diff)

comment:5 by Bang Pham Huu, 9 years ago

The workaround like Dimitar has shown will delete all the users definition CRS as XQuery will store these information in secoredb.

Last edited 9 years ago by Bang Pham Huu (previous) (diff)

comment:6 by Dimitar Misev, 9 years ago

Priority: majorminor

Ok let's keep this ticket on hold, if someone else comes up with an issue we can think about it again.

comment:7 by Bang Pham Huu, 8 years ago

The problem with this ticket is because of in another ticket I've modified the userdb (although it is called userdb but actually all the existing CRSs here belonged to Rasdaman, like Index2D, 3D,…). And then when user update from old version of SECORE to this version has this change, it has been conflict and Dimitar proposed to remove the secoredb as it will reload the new version of SECORE.

So to avoid this problem again (e.g: in userdb, Rasdaman add some other CRSs) and user already added some CRSs in userdb, and we cannot tell user to remove their SECORE for this purpose. So I propose a solution for avoiding this problem:

+ Current userdb renamed to rasdamandb as they are parametered CRSs which was added from Rasdaman.
+ Create a empty: userdb for the purpose of user (add/modify the CRSs).

Then the imported CRSs by users will not be affect by any changes from EPSG or Rasdaman db. Wait for Dimitar's answer.

comment:8 by Bang Pham Huu, 8 years ago

Description: modified (diff)
Milestone: 10.0
Priority: minormajor
Summary: UnixTime crs contains an extra TimeCS tag in secoreSECORE_Separte Rasdaman CRSs definition from userdb

comment:9 by Bang Pham Huu, 8 years ago

Description: modified (diff)
Milestone: 10.09.3
Summary: SECORE_Separte Rasdaman CRSs definition from userdbSECORE_Update Secoredb by update scripts
Note: See TracTickets for help on using tickets.