Skip to content

[Node] Generalize request correlation: add Phase 0 join bootstrap #88

Description

@thep2p

Summary

Generalize BaseNode's waiter map beyond IdSearchRes so multiple concurrent outstanding requests of different message types can be correlated by Nonce. Implement Phase 0 (bootstrap): asking an introducer for its max populated level.

Algorithm detail: docs/protocol/concurrent-insert.md, Sections 3.0–3.1.

Files

  • src/node/base_node.rs — generalize request_id_map; add the Phase 0 GetMaxLevelOp/RetMaxLevelOp round trip as an async entry point; every wait wrapped in a timeout.

Acceptance Criteria

  • Multiple in-flight requests of different message types are tracked and resolved independently by Nonce.
  • No unbounded recv() is introduced in the new correlation code.
  • Tests cover: single request resolves correctly, two concurrent requests of different types resolve to the correct caller, timeout fires when no reply arrives.

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 <-- YOU ARE HERE  #89
    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