mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #107] [MERGED] perf(p2p): parallelize catalog peer lookups #185
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#185
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/107
Author: @catyans
Created: 8/3/2026
Status: ✅ Merged
Merged: 8/25/2026
Merged by: @LSX-s-Software
Base:
main← Head:perf/p2p-parallel-catalog-lookup📝 Commits (5)
326592fperf(p2p): parallelize catalog peer lookupscda8d77fix(p2p): consume buffered lookup results directlyf8603ddstyle(p2p): apply rustfmt to lookup helper70ccd6dtest(p2p): synchronize concurrency window assertion951f1cbtest(p2p): bound buffered lookup synchronization📊 Changes
1 file changed (+139 additions, -12 deletions)
View changed files
📝
src/p2p/iroh/transport.rs(+139 -12)📄 Description
Summary
Why
lookup_peerscurrently waits for every candidate serially. With the default5-second per-peer timeout, stale peers at the front of the discovery result can
make lookup latency grow as
N * lookup_timeout.The new ordered buffer starts up to four lookups concurrently but consumes their
results in candidate order. This bounds connection fan-out and reduces timeout
accumulation without changing scheduler priority.
Lingjun validation
Validation was run on the four-node Lingjun cluster, not on the development
machine.
cargo fmt --all -- --checkp2p::iroh::transport::tests: 14 passedFour-node latency experiment
192.168.0.42)All endpoints were produced by real
IrohBlobsP2pTransportinstances. The firsttwo providers were then stopped before measurement; the third continued serving
the published artifact.
mainThe change reduced mean lookup latency by approximately 50.6%; all 10/10
lookups returned the descriptor from lingjun-102.
The branch was subsequently rebased onto v0.1.1
main;git range-diffconfirmed that all four patch commits remained identical.
Fixes #95
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.