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

make wantlist updates to connected peers happen async #829

Merged
merged 2 commits into from
Feb 27, 2015

Conversation

whyrusleeping
Copy link
Member

I spent some time debugging why the gateway nodes have been slow recently, and it came down to these sends taking a long time for certain peers. Since bitswap uses a routed peerhost, I think that some peers in the ledger werent connected to, and it was maybe trying to reconnect to them to send them a message.

@whyrusleeping whyrusleeping added status/in-progress In progress topic/bitswap Topic bitswap labels Feb 26, 2015
@cryptix
Copy link
Contributor

cryptix commented Feb 26, 2015

LGTM assuming contexts cancel properly.

@jbenet
Copy link
Member

jbenet commented Feb 26, 2015

@whyrusleeping i'd use a waitgroup here. otherwise it wont rate limit

if err != nil {
log.Debugf("Error sending message: %s", err)
}
}(p)
Copy link
Member

Choose a reason for hiding this comment

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

waitgroup?

whyrusleeping added a commit that referenced this pull request Feb 27, 2015
make wantlist updates to connected peers happen async
@whyrusleeping whyrusleeping merged commit ce74727 into master Feb 27, 2015
@whyrusleeping whyrusleeping removed the status/in-progress In progress label Feb 27, 2015
@whyrusleeping whyrusleeping deleted the fix/async-newblocks branch February 27, 2015 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/bitswap Topic bitswap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants