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

DHT providing never finishes #32

Closed
raulk opened this issue Jun 10, 2019 · 2 comments
Closed

DHT providing never finishes #32

raulk opened this issue Jun 10, 2019 · 2 comments

Comments

@raulk
Copy link
Member

raulk commented Jun 10, 2019

It uses a context with no deadline, which does not operate well with DHT providing:

goroutine 13313 [9m0s]:
github.com/libp2p/go-libp2p-kad-dht.(*IpfsDHT).Provide [0xc0001888f0, 0x1a534a0, 0xc0151884c0, 0xc002cf0ed0, 0x24, 0xc0003d2601, 0x0, 0x0]
	/root/gopath/pkg/mod/github.com/libp2p/go-libp2p-kad-dht@v0.1.1-0.20190607150147-25009616a4d5/routing.go:422
github.com/libp2p/go-libp2p-pubsub-router.bootstrapPubsub.func1 [0x7f2feb060d90, 0xc0001888f0, 0x1a534a0, 0xc0151884c0, 0xc002cf0ed0, 0x24, 0xc0181b8f50, 0x47]
	/root/gopath/pkg/mod/github.com/libp2p/go-libp2p-pubsub-router@v0.1.0/pubsub.go:338
created by github.com/libp2p/go-libp2p-pubsub-router.bootstrapPubsub []
	/root/gopath/pkg/mod/github.com/libp2p/go-libp2p-pubsub-router@v0.1.0/pubsub.go:337
@aschmahmann
Copy link
Contributor

@raulk this is the same issue as #28 which we mostly plan to solve by landing libp2p/go-libp2p-pubsub#184.

Unfortunately, PubSub.Publish() does not take a context which means to some degree this problem will still exist until we either A) give Publish a context, or B) allow Publish (at either the PubSub or floodsub/gossipsub layer) to store a backlog of messages to be sent once bootstrapping has completed and we've found peers.

If we land libp2p/go-libp2p-pubsub#184 without solving the above we can easily just wrap the Publish with a goroutine + context to make sure that we respect the context of PutValue.

@aschmahmann
Copy link
Contributor

@raulk I'm going to close this as a duplicate of #28. Feel free to reopen if you feel this is a different issue.

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

No branches or pull requests

2 participants