CDLUC3 / mrt-doc

Documentation and Information regarding the Merritt repository
8 stars 4 forks source link

Storage "fix" - Inventory "replace" methods #1815

Closed dloy closed 3 weeks ago

dloy commented 8 months ago

Problem

There are specific content issues that because of our data architecture require different approaches for cleanup.

Examples:

A generic way of fixing all of these is not clearly defined (at this point)

Proposal

Use a storage "fix' command with inventory "replace".

Storage fix

A proposed format for this command:

curl -X POST http(s)://<storage service>:35121/fix/<node>/<ark>?type=<identifier of code to be applied to a specific object to correction>

When storage receives this request:

Inventory replace

A proposed format for this command:

curl -X POST -F "url=<storage service>:35121/manifest/<node>/<ark>" -F "responseForm=xml" http://<inventory service>:36121/replace

System fix

CRITICAL TO THIS PROCESS is that the system has corrected this problem for all subsequent versions

Example ?type=changeToken

For all versions of object

After:

The result of this process is:

As mentioned above a changeToken fix needs to be made in the Nuxeo handling so all future versions will not include the changeToken as part of the file path name.

Comment

This approach allows a specific fix to be applied to storage content without requiring a generic approach which is not clearly understood.

The fixed content will allow all generated files to meet current restrictions: e.g. manifest.xml

Using this approach the fixes can be applied now. As these fixes get applied and identified, later generic methods or architectural changes can be made.

Note: Requires new Inventory mrt-zk implementation.

dloy commented 8 months ago

Goal: changeToken

Recreate object in Merritt as if the ?changeToken=value had not been attached as an extension on the fileID

Process

Requires that conditions causing changeToken problem no longer exist for future versions

dloy commented 6 months ago

Commands

Storage (possible Ingest)

API to process in place changeToken update to an existing Merritt Object

curl -X GET "http://storage.cdlib.org:35121/fix/6501/ark%3A%2F13030%2Fm56t6p2z?type=changeToken"

API - changeToken fix

http://<storage host:port>/fix/<base node number>/<ark>?type=changeToken

Inventory

API to reset modified changeToken object in Merritt inv database

curl -X POST \
-F "url=http://storage.cdlib.org:35121/fix/6501/ark%3A%2F13030%2Fm56t6p2z?type=changeToken" \
-F "responseForm=xml" \
http://inventory.cdlib.org:36121/replace

API - inventory replace

curl -X POST \
-F "url=<storage fix url> \
-F "responseForm=xml" \
http://<inventory host:port /replace