Skip to content

fix: set context timeout for queryPeer - #996

Merged
lidel merged 4 commits into
masterfrom
marco/set-query-ctx
Nov 13, 2024
Merged

lidel merged 4 commits into
masterfrom
marco/set-query-ctx

Conversation

@MarcoPolo

@MarcoPolo MarcoPolo commented Oct 23, 2024 •

Copy link
Copy Markdown
Contributor

Accompanies #994

@ligustah could you confirm if this fixes your issue?

@guillaumemichel guillaumemichel left a comment

Copy link
Copy Markdown
Member

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
@lidel lidel mentioned this pull request Nov 13, 2024
3 tasks done

@lidel lidel left a comment •

Copy link
Copy Markdown
Collaborator

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
@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