-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve tracing #873
Improve tracing #873
Conversation
If the channel was unbuffered that would leak go routines. However, the channel is buffered with |
Indeed I just got lucky and tests were passing at a moment, the actual issue was that Kubo were registering routing events and then synchronously call findprovs, however findprovs might not return until we first find something in the parallel routing helpers, so kubo was not draining the routing events and thus it was blocking the dht's logic. |
LGTM, but let's wait for libp2p/go-libp2p-routing-helpers#80 to land before we merge this PR. |
8a54302
to
4d06653
Compare
MB Copy Paste Typo, This caused panics while tracing.
go-libp2p-routing-helpers has an optimized implementation that does nothing if we are not tracing, it also properly log all IO of the request.
We always select it against ctx and we don't rely on the fact it will always be non blocking since when count is zero we can't realistically preallocate. Buffering use more memory makes more garbage and is less efficient than direct copies.
4d06653
to
a30420d
Compare
This reuse libp2p/go-libp2p-routing-helpers#80 which logs all inputs and outputs