-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
basic reprovider implementation #554
Conversation
@@ -1,6 +1,6 @@ | |||
{ | |||
"ImportPath": "github.com/jbenet/go-ipfs", | |||
"GoVersion": "go1.3", | |||
"GoVersion": "devel +9ef10fde754f Thu Dec 11 16:32:25 2014 +1100", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.3 or (1.4)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, thanks
a43a5ae
to
dcce1f0
Compare
you'll want to edit the commit where context isn't vendored |
dcce1f0
to
2694e9b
Compare
@@ -6,7 +6,7 @@ import ( | |||
"strings" | |||
"syscall" | |||
|
|||
fuseversion "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-fuse-version" | |||
fuseversion "github.com/jbenet/go-fuse-version" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you somehow unvendored go-fuse-version
. are you running straight up make vendor
?
Oh, you might not have the dep. it may be important to make it:
vendor: godep
go get ./...
godep save -r ./...
cc @briantigerchow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm all for anything that helps to reduce friction so long as it respects the developer's GOPATH.
I tend to use godep restore ./...
to turn vendored dependencies into packages in my GOPATH, but I recognize that some may find this behavior inconvenient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i just ran 'make vendor' not sure what happened there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sigh godep vendoring. i think that godep get ./...
will:
- only fetch things the user doesnt have (so wont break things for them)
- will still require a
godep update <path>
to change to the version the user has.
why did this rewrite even happen? godep has no business turning that back into a non-vendored pkg...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@whyrusleeping this got changed back again-- i'll update this path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k updated
beautifully simple implementation 👍 some cases may come up later where we want to send signals to reprovide, but nothing comes to mind. Oh, one question: are provider records and provider's addresses kept in a distinct spot in dht? e.g.:
|
(this reminds me we need to evict user's addresses from the peerstore over time), tricky: only for addresses we find outside, bootstrap addrs should remain the same. and our own addrs should be up to date with our interfaces). laptop moving around will surely mess ipfs up |
everything failed? |
@briantigerchow your commit fixes things, no need to rebase or anything |
@whyrusleeping we need to rebase to make sure every commit passes tests. |
oh yeah... thats right. duh |
4d57624
to
2ae9340
Compare
@whyrusleeping can you answer question above, on "provider records and provider's addresses kept in a distinct spot"? |
No, i dont think the dht stores addresses, thats entirely handled by the peerstore as far as i know |
interesting bitswap test hang: https://build.protocol-dev.com/job/gotest/666/console |
nevermind, that's correct. I read "docker image" as "docker test". my bad. |
no idea on that bitswap hang, never seen that test hang before. ill look into it in a little bit, but i doubt we will see it again... (so there goes any hope of getting a debug log! ) |
c918444
to
f068c89
Compare
I screwed up including davecheney's go-crosscompile. just removed. godep should use git. omg. can't wait till we build a real dep manager with ipfs. |
Before merging this in, it should have a test. maybe:
|
I think I also want to add a command so a user can manually trigger the reprovide. |
@whyrusleeping is that test ready? if you cant get to it to day lmk and i'll do it (nbd, just want to push the ball forward) |
Yeah, the test is pushed. The jenkins failure is one of the race conditions from #569 |
@jbenet RFM? |
@whyrusleeping not ready, @briantigerchow commits need squashing. I can do it for you if you want just lmk |
@jbenet I can get to it in about 30 minutes, otherwise you can do it if you want. |
491eaf9
to
a6ec12a
Compare
Alright, all the tests are passing, but I have one issue, if you start the daemon and fail to bootstrap quickly enough, the reprovide will fail since there wont be any peers in the routing table to provide to. I think that the bootstrapping operation performed in core should block until it completes the first round of bootstrapping, this will solve the reprovides issue and provide what I think are better semantics to the creation of a node. |
We should have a test case with precisely this. should this be an error? it probably should silently drop "no connections" errors coming from routing. (i.e. maybe log them, but should the reprovider semantics be fulfilled? @briantigerchow thoughts?
Hm, that may slow down other things. but might be good. @briantigerchow ? |
It's probably a good thing that routing returns an error if it was unable to provide the value to at least one peer. And errors shouldn't be dropped in this case. We happen to be in a position to handle them. Here, it might be alright to retry until a
It might be sufficient to log a
Same thoughts as you. I'd be down to try it and see how it affects usage. Low risk experiment. |
I like the idea of a retry with a backoff. Ill hack that up |
29daa82
to
acfc352
Compare
There we go! @jbenet final once over? |
@whyrusleeping LGTM! i'll merge. |
basic reprovider implementation
fix incorrect error handling during provider record lookups
This PR currently has basic functionality, im not sure what else we would need, so im RFCR