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: remove timeout on default DHT operations #9783

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

guseggert
Copy link
Contributor

This removes the timeout by default for DHT operations. In particular this causes issues with ProvideMany requests which can take an indeterminate amount of time, but really these should just respect context timeouts by default. Users can still specify timeouts here if they want, but by default they will be set to "0" which means "no timeout".

This is unlikely to break existing users of custom routing, because there was previously no utility in configuring a router with timeout=0 because that would cause the router to immediately fail, so it is unlikely (and incorrect) if anybody was using timeout=0.

@guseggert guseggert requested a review from lidel March 30, 2023 18:11
This removes the timeout by default for DHT operations. In particular
this causes issues with ProvideMany requests which can take an
indeterminate amount of time, but really these should just respect
context timeouts by default. Users can still specify timeouts here if
they want, but by default they will be set to "0" which means "no
timeout".

This is unlikely to break existing users of custom routing, because
there was previously no utility in configuring a router with timeout=0
because that would cause the router to immediately fail, so it is
unlikely (and incorrect) if anybody was using timeout=0.
@guseggert guseggert force-pushed the feat/composed-router-timeout branch from a508ead to 5fda291 Compare March 30, 2023 18:24
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.

we had another 5m timeout in func Routing(in p2pOnlineRoutingIn) irouting.ProvideManyRouter, pushed a fix too.

Tests in go-libp2p-routing-helpers should be good enough.
Let's merge it and ask someone with big repo and announce problem (#9722) to test 0.20-rc1 when it's out (or to build from master)

@guseggert guseggert marked this pull request as ready for review March 30, 2023 20:08
@guseggert guseggert merged commit a09c8df into master Mar 30, 2023
@guseggert guseggert deleted the feat/composed-router-timeout branch March 30, 2023 20:11
@BigLep
Copy link
Contributor

BigLep commented Mar 31, 2023

@guseggert : I think this needs a changelog entry (or is that happening elsewhere)?

@guseggert
Copy link
Contributor Author

@guseggert : I think this needs a changelog entry (or is that happening elsewhere)?

#9784

@galargh galargh mentioned this pull request Apr 3, 2023
galargh pushed a commit that referenced this pull request Apr 4, 2023
* fix: remove timeout on default DHT operations

This removes the timeout by default for DHT operations. In particular
this causes issues with ProvideMany requests which can take an
indeterminate amount of time, but really these should just respect
context timeouts by default. Users can still specify timeouts here if
they want, but by default they will be set to "0" which means "no
timeout".

This is unlikely to break existing users of custom routing, because
there was previously no utility in configuring a router with timeout=0
because that would cause the router to immediately fail, so it is
unlikely (and incorrect) if anybody was using timeout=0.

* fix: remove 5m timeout on ProvideManyRouter

For context see
5fda291

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
galargh added a commit that referenced this pull request Apr 5, 2023
* chore: update version

* chore: update go-libp2p to v0.26.4

* fix: remove timeout on default DHT operations (#9783)

* fix: remove timeout on default DHT operations

This removes the timeout by default for DHT operations. In particular
this causes issues with ProvideMany requests which can take an
indeterminate amount of time, but really these should just respect
context timeouts by default. Users can still specify timeouts here if
they want, but by default they will be set to "0" which means "no
timeout".

This is unlikely to break existing users of custom routing, because
there was previously no utility in configuring a router with timeout=0
because that would cause the router to immediately fail, so it is
unlikely (and incorrect) if anybody was using timeout=0.

* fix: remove 5m timeout on ProvideManyRouter

For context see
5fda291

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>

* chore: bump go-blockservice to v0.5.1

* chore: update version

* chore: update changelog for v0.19

---------

Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
Co-authored-by: Gus Eggert <gus@gus.dev>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants