metacatui icon indicating copy to clipboard operation
metacatui copied to clipboard

Check the index queue for the resource map when the editor is opened without one

Open isteves opened this issue 7 years ago • 4 comments

I made a change to the description of a data file, and then submitted changes. It took a long time to process (> 2 minutes), so I thought it had stalled and exited out of the page. Now, based on the errors, it seems like I've updated a data object but broken the resource map link to it. https://test.arcticdata.io/#view/urn:uuid:e7298551-8be7-405f-860e-66c462dcd15d

This was my first error:

identifier

This is what I'm getting now:

identifier2

Note: I had added prov relationships to the package before editing it. That might be why it took so long to submit.

Tested on Windows Edge

isteves avatar Apr 04 '18 21:04 isteves

I know I've seen this error message before and I'm not clear how it's happening. I think this may be happening when there is an indexing delay. The editor should be changed to properly handle datasets that are not fully indexed.

laurenwalker avatar Apr 05 '18 16:04 laurenwalker

^ This reminds me of a problem we run into sometimes with arcticdatautils::publish_update. If the function breaks partway, we end up with partially updated packages that are no longer joined together. We get around this by running arcticdatautils::get_all_versions on everything and linking them together with a rm again. (I'm sure there's a sleeker way that you/the editor can do, though)

isteves avatar Apr 05 '18 16:04 isteves

After looking into this, I think that the simple answer is that if someone exits the page while the package is still saving, things will get messed up. We have an "Are you sure?" alert that appears before the user leaves the page so hopefully avoid this.

The one thing we could do is when the editor is opened for an existing metadata doc with no resource map, we should check the system metadata to see if it obsoletes another metadata doc. If so, we can query for the resource map ID of the previous version and open that resource map in the editor, like we would if the chain were never broken.

I created a new issue for this particular improvement: #578

I think the error shown in Irene's screenshots happened because the resource map or metadata doc was not done indexing. When we deploy our index queue API service, we should be able to tell if a resource map is still in the queue and disable the editor until it's done.

laurenwalker avatar Apr 18 '18 16:04 laurenwalker

See additional context and discussion in https://github.com/NCEAS/metacatui/issues/2588

robyngit avatar Dec 19 '24 14:12 robyngit