You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the try_relink primitive backing the backpointer-repair mechanism (docs/protocol/concurrent-insert.md, Section 6). Like try_link (#85), but with an "already consistent" no-op outcome and reporting the evicted neighbor on replacement (Section 4.3).
Files
src/core/lookup/mod.rs — LookupTable trait gains try_relink; add the RelinkOutcome enum:
AlreadyConsistent — current entry already equals the claimant; no table write.
Summary
Add the
try_relinkprimitive backing the backpointer-repair mechanism (docs/protocol/concurrent-insert.md, Section 6). Liketry_link(#85), but with an "already consistent" no-op outcome and reporting the evicted neighbor on replacement (Section 4.3).Files
src/core/lookup/mod.rs—LookupTabletrait gainstry_relink; add theRelinkOutcomeenum:AlreadyConsistent— current entry already equals the claimant; no table write.Forward(Identity)Relinked { evicted: Option<Identity> }src/core/lookup/array_lookup_table.rs— implementtry_relink(level, direction, claimant: Identity) -> anyhow::Result<RelinkOutcome>, single write-lock critical section.src/core/lookup/array_lookup_table_test.rs— tests per the criteria below.Acceptance Criteria
try_relinknever callsget_entry/update_entryas two separate lock acquisitions.AlreadyConsistent, table unchanged.Forward, table unchanged.Relinked { evicted: None }.Relinked { evicted: Some(_) }.get_entry/update_entry/remove_entryandtry_link([Core] Add try_link: atomic accept-or-forward slot decision #85).Dependencies
None.