Repository navigation
fix: set context timeout for queryPeer - #996
Merged
Merged
Conversation
guillaumemichel
approved these changes
Oct 23, 2024
guillaumemichel
left a comment
Member
There was a problem hiding this comment.
Makes sense, thanks @MarcoPolo! Let's wait for @ligustah 's confirmation
queryPeerqueryPeer
lidel
added a commit
to ipfs/kubo
that referenced
this pull request
Nov 13, 2024
testing timeouts from libp2p/go-libp2p-kad-dht#994 and libp2p/go-libp2p-kad-dht#996
3 tasks done
lidel
approved these changes
Nov 13, 2024
Collaborator
There was a problem hiding this comment.
I've tested this on kubo-staging-us-east-02 (internal notes) and locally in someguy and no concerns so far.
I'm going to merge this and tag a release to include it in Kubo 0.32.
Merged
lidel
added a commit
that referenced
this pull request
Nov 15, 2024
This aims to correctly apply intention of fix from #996 It did not work correctly because `context.WithTimeout` was created once per goroutine but was used for multiple queries within the `for p := range jobs` loop. This meant once the timeout expires for the first query, all subsequent queries in that worker would immediately fail since they're using the same expired context.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Accompanies #994
@ligustah could you confirm if this fixes your issue?