Bug #7624
Updated by Rob Nahf almost 9 years ago
Reviewing the cases for resolving a SID to the latest PID, I came across a missing case that I believe will return the wrong PID for the situation.
It pertains to mainly mutable Member Nodes where obsoletedBy fields likely never get populated, increasing the reliance on dateUploaded to determine the head. The general logic for resolving SIDs is to prefer obsolete chains over upload date, since the former is a direct reflection of what the submitter intends, whereas upload date is an accident of the order in which objects are successfully created on the MN. (For example, a systemMetadata problem with an earlier revision could result in a later upload date than a later revision.
The scenario is best expressed as the following:
<pre>
P1(S,D2) <- P2(S,D1)
</pre>
P2(S,D1), where S is the SeriesId, and D1 and D2 are upload dates, and dates. where D2 is later than D1.
S should resolve to P2, but by current algorithm in Metacat's IdentifierManager.getHeadPid(Identifier sid), two type 1 ends are produced, and their upload dates decide the head, so and P1 is determined to be the head.
The obsoletes field in P2 in this case is ignored information that should not be. The obsoletes field is used elsewhere in the algorithm to resolve situations where there is one missing revision in an otherwise complete chain.
It would be implemented as a secondary step when 2 or more candidate revisions are encountered.
It pertains to mainly mutable Member Nodes where obsoletedBy fields likely never get populated, increasing the reliance on dateUploaded to determine the head. The general logic for resolving SIDs is to prefer obsolete chains over upload date, since the former is a direct reflection of what the submitter intends, whereas upload date is an accident of the order in which objects are successfully created on the MN. (For example, a systemMetadata problem with an earlier revision could result in a later upload date than a later revision.
The scenario is best expressed as the following:
<pre>
P1(S,D2) <- P2(S,D1)
</pre>
P2(S,D1), where S is the SeriesId, and D1 and D2 are upload dates, and dates. where D2 is later than D1.
S should resolve to P2, but by current algorithm in Metacat's IdentifierManager.getHeadPid(Identifier sid), two type 1 ends are produced, and their upload dates decide the head, so and P1 is determined to be the head.
The obsoletes field in P2 in this case is ignored information that should not be. The obsoletes field is used elsewhere in the algorithm to resolve situations where there is one missing revision in an otherwise complete chain.
It would be implemented as a secondary step when 2 or more candidate revisions are encountered.