Skip to content

[Node] Wire: CheckNeighborOp repair handler #96

Description

@thep2p

Summary

Wire the process_incoming_event match arm for CheckNeighborOp (the backpointer-repair probe) in src/node/base_node.rs, using the try_relink-backed relink-decision handler. Algorithm detail: docs/protocol/concurrent-insert.md, Section 6.2.

Files

  • src/node/base_node.rs — one new match arm.

Acceptance Criteria

  • Implements the three-branch check_neighbor logic (Section 6.2): AlreadyConsistent → no-op, no message sent; Forward → relay the identical probe (claimant, side, level) to the existing neighbor; Relinked { evicted } → always send a SetLinkOp correction to claimant, and — only when evicted is Some — additionally recurse a CheckNeighborOp to the evicted node, re-probing with w's own identity as the new claimant and the opposite side; no recursive message when evicted is None.
  • A try_relink error (invalid level) propagates via .map_err(...)?; not unwrapped.
  • Tests cover all three branches, including both Relinked sub-cases: with eviction (correction sent, recursive probe sent) and without (correction sent, no recursive probe).

Dependencies

Dependency graph (unblocked first):
EPIC #81 -- local search & join protocol
  #67 [DONE] search_by_id            #71 [OPEN] search_by_mem_vec (independent)
  #74 [OPEN] search_by_id timeout fix   #76 [OPEN] delete/leave
  Concurrent join + repair (Algorithm 2 + Algorithm 8; supersedes closed #66, #77):
    L0 (no deps):         #84  #85  #93  #86  #87
    L1:                   #94  #88  #89
    L2:                   #90  #91  #95  #96 <-- YOU ARE HERE
    L3:                   #92
    L4 (acceptance gate): #97

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions