Skip to content

[feat][node] Add predecessor search round trip for join stage 1 - #136

Open
TheP2P (thep2p) wants to merge 1 commit into
thep2p/90-explicit-span-parentagefrom
thep2p/90-predecessor-search-roundtrip
Open

TheP2P (thep2p) wants to merge 1 commit into
thep2p/90-explicit-span-parentagefrom
thep2p/90-predecessor-search-roundtrip

Conversation

@thep2p

Copy link
Copy Markdown
Collaborator

Summary

  • Add search_stage1_anchor, an async round trip that sends SearchByIdRequest directly to an introducer, bypassing this node's own (still empty, pre-join) local search, and correlates the reply via a fresh Waiter::AsyncSearch oneshot channel under a timeout.
  • Extend the existing SearchByIdResponse handling to also resolve Waiter::AsyncSearch, alongside its existing blocking-caller Waiter::Search check.
  • Direction is caller-supplied, not hardcoded, since which side to search from depends on where the introducer sits relative to this node (wired up in a later PR in this stack).
  • New dedicated test (test_search_stage1_anchor_resolves), mirroring get_max_level's existing isolated-resolve test pattern.

Part of #90's join stage-1 linking, split into a PR stack: this is the second round-trip primitive (predecessor/successor search) after the address refactor and span-parentage cleanup.

Test plan

  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test

@thep2p
TheP2P (thep2p) added this pull request to stack #143 September 14, 2026 20:23
@thep2p
TheP2P (thep2p) force-pushed the thep2p/90-predecessor-search-roundtrip branch from 9d8db15 to c38c741 Compare September 15, 2026 17:27
@thep2p
TheP2P (thep2p) force-pushed the thep2p/90-predecessor-search-roundtrip branch from c38c741 to 644e218 Compare September 15, 2026 17:50
@thep2p
TheP2P (thep2p) force-pushed the thep2p/90-predecessor-search-roundtrip branch from 644e218 to 66ce618 Compare September 15, 2026 21:09
@thep2p
TheP2P (thep2p) requested review from S T (staheri14) and removed request for S T (staheri14) September 15, 2026 21:17
@thep2p
TheP2P (thep2p) force-pushed the thep2p/90-predecessor-search-roundtrip branch from 66ce618 to 84a6d15 Compare September 18, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant