Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

improve timeouts #77

Merged
merged 4 commits into from
Jun 26, 2018
Merged

improve timeouts #77

merged 4 commits into from
Jun 26, 2018

Conversation

Stebalien
Copy link
Member

Related to #70, libp2p/go-libp2p#1547

Depends on libp2p/go-libp2p-net#26

(needs gx deps to be bubbled)

@ghost ghost assigned Stebalien Jun 14, 2018
@ghost ghost added the status/in-progress In progress label Jun 14, 2018
@magik6k
Copy link
Contributor

magik6k commented Jun 15, 2018

[well, assuming tests pass after importing gx deps]

@Stebalien Stebalien added the status/blocked Unable to be worked further until needs are met label Jun 15, 2018
The global per-peer dial timeout had a significant drawback: When dialing many
peers, this timeout could cause libp2p to cancel dials while they were still
stuck in the limiter.

A better but more complicated approach is a time budget system but we can
implement that later.

This change simply applies the limit to each `DialPeer`/`NewStream` call
independently and makes it easy to override. While old timeout tried to
account for how much we're willing to spend dialing a single peer, this new
timeout tries to account for the amount of time a single "client" is willing to
wait for a dial to complete before they no longer care.
@Stebalien Stebalien removed the status/blocked Unable to be worked further until needs are met label Jun 26, 2018
@Stebalien
Copy link
Member Author

So, this is now done. IMO, it's a strict improvement so we might as well merge and continue discussing improvements in libp2p/go-libp2p#1547.

@Stebalien Stebalien merged commit fe3975a into master Jun 26, 2018
@ghost ghost removed the status/in-progress In progress label Jun 26, 2018
@Stebalien Stebalien deleted the feat/better-timeouts branch June 26, 2018 03:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants