Skip to content

[Node] Implement: periodic backpointer repair sweep #89

Description

@thep2p

Summary

Implement the repair sweep itself: on each RepairSchedule tick, send one CheckNeighborOp per currently-populated table entry, and manage the task's lifecycle.

Details

See docs/protocol/concurrent-insert.md, Sections 6.1 and 6.4, for the sweep algorithm and lifecycle requirements.

Files

  • src/node/base_node.rs — sweep loop spawned via tokio::spawn against a child of the node's IrrevocableContext; JoinHandle stored and aborted on shutdown (RAII, no orphaned task).

Acceptance Criteria

  • Sweep is unconditional per entry (per Section 6.1) — no local staleness pre-guessing.
  • Task is cancelled if the node's parent context is cancelled, and can be cancelled independently.
  • Tick interval is abstracted behind a schedule trait, not a literal tokio::time::sleep/interval call in the task body, with a test-controlled implementation enabling deterministic single-tick triggering.
  • Test: one tick sends the expected probes for a populated table.
  • Test: task aborts cleanly on shutdown with no residual state.

Depends On

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 <-- YOU ARE HERE
    L2:                   #90  #91  #95  #96
    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