Implement multi-strategy resource map lookup #2678
Labels
ADC CI-09
Enhanced data submission tools & portals (ADC deliverable)
arctic data center
ESS-DIVE
Issues associated with the ESS-DIVE project
submission & error handling
Problems surrounding failed metadata submissions in the editor
Milestone
Sometimes when a user updates a dataset, the resource map (RM) hasn't been indexed in solr yet. If they try to edit the dataset before indexing completes, MetacatUI can't find the RM and creates a new one - as it would for an EML-only dataset - breaking the version chain and making it seem to the user like their data is lost. This has caused confusion for users, extra work for the data team, and undermines trust in repository reliability.
MetacatUI should stop automatically creating new resource maps for existing EML documents and instead use a multi-step strategy to locate the correct RM using system metadata, localStorage, and other fallback methods. When the RM is not found, the user should be notified that the dataset is still indexing and they should try again later or contact support.
The proposed multi-strategy lookup process
localStorage
for a cached RM PID associated with recent submissions.obsoletes
chain to find the most recent previous version with a known RM.obsoletedBy
(sysmeta) until we reach the RM that corresponds to the current EML PID.resource_map_${EML_PID}
.Example scenarios that use the multi-strategy lookup process
Scenarios use
A
,B
, andC
to represent EML within a version chain, andA'
,B'
, andC'
to represent the corresponding resource map.C
is most recent, whileA
is the oldest in the chain.Scenario 1: Most recent version not indexed
Scenario:
A → B
, RM:A' → B'
Editor behavior:
B
B'
givenB
, but finds nothing becauseB'
is not indexed yet.localStorage
and findsB'
saved from the previous edit.B'
points to the correct EML PIDB
.B'
as the correct RM.Scenario 2: Most recent version not indexed & in a new browser
Scenario:
A → B → C
, RM:A' → B' → C'
Editor behaviour:
C
C'
givenC
, but finds nothing becauseC'
andC
are not indexed yet.localStorage
, but finds nothing because the user is in a new browser and has no pids saved.C
, looks at<obsoletes>B</obsoletes>
and finds PIDB
.B'
givenB
and findsB'
which is indexed.B'
, looks at<obsoletedBy>C'</obsoletedBy>
and finds PIDC'
.C'
points to the correct EML PIDC
.C'
as the correct RM.Scenario 3: Two most recent versions are unindexed & in a new browser
Scenario:
A → B → C
, RM:A' → B' → C'
Editor behaviour:
C
C'
givenC
, but finds nothing because neitherC
norC'
are indexed yet.localStorage
, but finds nothing because the user is in a new browser and has no pids saved.C
, looks at<obsoletes>B</obsoletes>
and finds PIDB
.B'
givenB
, but finds nothing because neitherB
norB'
are indexed yet.B
, looks at the<obsoletes>A</obsoletes>
and finds PIDA
.A'
givenA
, finds RMA'
(indexed).A'
, looks at<obsoletedBy>B'</obsoletedBy>
and finds PIDB'
.B'
, looks at<obsoletedBy>C'</obsoletedBy>
and finds PIDC'
.C'
points to the correct EML PIDC
.C'
as the correct RM.Scenario 4: Newly submitted unindexed dataset with unconventional RM PID & empty localStorage
Scenario:
A
and RMA'
, the user is trying to createB
andB'
Editor behaviour:
A
A'
givenA
, but finds nothing because neitherA
norA'
are indexed yet.localStorage
, but finds nothing because the user is in a new browser.A
, looks for<obsoletes>
and finds nothing becauseA
is the first version.resource_map_A
, tries to fetch it via Object API, but finds nothing because the RM has an unconventional PID.Tasks
Related issues
This issue fixes or is a duplicate of these issues
Generally related to resource map problems in editor
The text was updated successfully, but these errors were encountered: