mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[GH-ISSUE #95] perf(p2p): bound catalog lookup latency across multiple peers #31
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#31
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?
Originally created by @catyans on GitHub (Jul 31, 2026).
Original GitHub issue: https://github.com/kvcache-ai/AgentENV/issues/95
Problem
IrohBlobsP2pTransport::lookup_peerscurrently queries candidate peerssequentially. Each remote lookup has its own timeout (5 seconds by default), so
stale or unreachable peers at the front of the scheduler-provided list can make
catalog lookup latency grow linearly with the number of failed candidates.
The implementation already calls this out with:
This affects both scheduler-index hits and broad peer-discovery fallback.
Proposed change
Run remote catalog lookups with a small fixed concurrency bound while retaining
the scheduler-provided ordering when selecting a successful descriptor.
over a lower-priority peer in the same window.
This reduces worst-case lookup time from approximately
N * lookup_timeouttoceil(N / concurrency) * lookup_timeoutwithout generating an unboundedconnection burst or discarding scheduler priority.
Validation
provider, comparing lookup latency before and after the change.