-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Ipfs pin add does not fetch raw leaves and thus pins incomplete dag #3688
Comments
I noticed this when working on #3671. I think know how to fix it so am assigning it to myself. |
This is because of that optimization on |
Correct. My plan is to change the Visit function in:
To actually retrieve the node from the dag service, because just because we have the link id, doesn't mean we have the node. |
Sometimes we don't care if we have the links locally, but when we call FetchGraph we most certainly do. |
Okay the fix I had in mind didn't work out. This is going to take some time to fix correctly with out defeating the original purpose I had in mind for GetLinks (filestore related and still relevant). |
@kevina I think its probably fine for the linkservice rawnode optimization to require that we at least have the block. Sure it won't be quite as fast, but it solves this problem much more efficiently. |
Average time of Has call to Datastore on our gateways and storage servers from recent metrics is 140 microseconds. |
Yeah, its much faster to call |
Can we please slow down. The linkservice is more than an optimization when it comes the interaction of the filestore. I will try to do a proper writeup tonight. In the mean time I have one question. Do you want the garbage collector to fail if a node in the filestore is no longer accessible? It does not have to be that way. |
The garbage collector should not be able to tell that a missing node is in the filestore or not. |
Let me put this another way. Do you want the garbage collector it to just abort if a leaf node of a pinned object is no longer available for some reason? Please note that it is perfectly safe for it to continue as a leaf node can not possible have any links so there is no risk of it removing something it should not because it could not see it. This is a very important question that will effect the usability of the filestore (at least how I envisioned it) so I would really like to have several people's opinion on this before we proceed. |
For now, yes. Abort. But make that an easy enough thing to change. |
@whyrusleeping would you mind if I refactor EnumerateChildren to preserve the indented behavior of the LinkService while still fixing this bug? It should also be able to eliminate the need for the bestEffort Boolean parameter. It should only take me a day or so. |
It really seems to me like the fix for this should be as simple as adding "if !blockservice.Has(c) { blockservice.Get(c) }" into the linkservice |
Okay, I will push a simple fix to EnumerateChildren that does what you suggest I will than work on a more proper fix. Expect something in the next few hours, by the end of the day at the latest. |
And it looks like #3598 fixed the issue by using |
Version information: ipfs version 0.4.6-dev 2e116b4
Type: Bug
Priority:P1
Description:
In local or offline mode:
The text was updated successfully, but these errors were encountered: