-
Notifications
You must be signed in to change notification settings - Fork 961
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
kad: get_providers() sometimes resolves with FinishedWithNoAdditionalRecord and no closest peers #5418
Comments
I am not very familiar with the disjoint paths query. It seems to be because the Does the same issue occur if you use another query routing technique (
|
I'm just calling https://docs.rs/libp2p-kad/0.45.3/libp2p_kad/struct.Behaviour.html#method.get_providers in this case. I guess I can try to modify the code to try it out, but it is slower to test that way.
I'm quite sure that I am. There are many concurrent queries happening and only a few end up like this and not even every time, sometimes I have 1000 successful in a row.
Not possible, the node making requests in thsi particular situation is such that physically and by design has no records.
I did not and wasn't even aware of such cache 😅 |
By default you should get 1 peer in the
You can simply try to set Is the code you are working on public? |
I will.
Yes, all of it, but it is a big project and might be a bit tricky as a demo of this issue. Let me do some experiments and post results here. |
It does happen with and without disjoint query paths. A smaller reproduction using https://github.com/subspace/subspace/tree/debug-piece-not-found-libp2p-wip is this:
You'll see some
While expectation is to see something like this (another one that was not found):
Error logs are not errors, I just made them errors so I have different colors 🙃
|
What is the size of the network? Given the high duration of the lookups (I am not sure which duration should be considered), it seems like the node was able to establish some connections and perform the lookup even though it didn't find the record. So it should have some peers to return in the |
We have over 8000 consensus nodes (clients) and at least the same number (likely higher) farmers that are serving data to clients.
That is my understanding as well. |
I have an app that does a lot of
get_providers()
calls via Kademlia.Most of the time they finish successfully, but occasionally the first and only query result is
GetProvidersOk::FinishedWithNoAdditionalRecord
with empty list of closest peers, which seems wrong both because the key is actually present on the network and due to closest peers list being empty.It would be reasonable if the key was not found and I got a list of closest peers, but the fact that list of closest peers is empty while Kademlia k-buckets are not empty tells me something is off here, but I'm having a hard time tracing what, where and why.
Sometimes I first get
GetProvidersOk::FoundProviders
with empty list followed byGetProvidersOk::FinishedWithNoAdditionalRecord
with a single peer ID, again for a key that definitely exists on the network.Any suggestions for debugging steps here?
libp2p-kad 0.45.3 (latest at the moment of writing),
disjoint_query_paths: true
The text was updated successfully, but these errors were encountered: