package hostclaim // IsOrphan is ยง5.1 step 5. The caller reads the record FIRST and this // claim AFTER it (R3-2). Each incarnation gets exactly one claim attempt, // and a record exists only after that attempt succeeded, so a claim read // after the record that does not name recordInc means recordInc can never // become the holder. A creating holder is named by Holder, so it is // covered. An absent claim is a legacy host (Q2), never an orphan. The // caller deletes only with DeleteIfMatch on the ETag it read. func IsOrphan(recordInc string, claimReadAfterRecord Observed) bool { if claimReadAfterRecord.Absent || claimReadAfterRecord.Claim == nil { return false } h := claimReadAfterRecord.Claim.Holder return h == nil || h.Incarnation != recordInc }