Skip to content
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

fix: set context timeout for queryPeer #996

Merged
merged 4 commits into from
Nov 13, 2024
Merged

fix: set context timeout for queryPeer #996

merged 4 commits into from
Nov 13, 2024

Conversation

MarcoPolo
Copy link
Contributor

@MarcoPolo MarcoPolo commented Oct 23, 2024

Accompanies #994

@ligustah could you confirm if this fixes your issue?

Copy link
Contributor

@guillaumemichel guillaumemichel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks @MarcoPolo! Let's wait for @ligustah 's confirmation

@lidel lidel changed the title fix: Set context timeout for queryPeer fix: set context timeout for queryPeer Nov 13, 2024
lidel added a commit to ipfs/kubo that referenced this pull request Nov 13, 2024
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@lidel lidel merged commit c7009d1 into master Nov 13, 2024
9 checks passed
@lidel lidel mentioned this pull request Nov 13, 2024
@guillaumemichel guillaumemichel deleted the marco/set-query-ctx branch November 14, 2024 06:52
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants