-
-
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
[add] --nocopy --trickle; copies data and ignores trickle #4052
Comments
cc @kevina |
@whyrusleeping My code never supported the trickle adder, so it is unlikely there is any support for it in IPFS. |
@whyrusleeping Is this issue still relevant to work on it? |
@schomatis Yeah, I don't think this has been fixed yet. Go right ahead :) |
@whyrusleeping It would seem that the I'll keep researching the issue to see what would imply adding it to the trickle importer. |
@schomatis that sounds about right to me. It should be fairly easy to do. |
@kevina If I'm following correctly the original PR I should replicate the |
@schomatis go ahead and create a p.r. but label it a work-in-progress (by prepending the title with "WIP:" or similar) and I will have a look. |
@kevina Regarding the trickle DAG Append family of functions, what should be the value of the offset for I don't see analogous functions for the balanced DAG and I don't know if the offset should be zero or should continue from the offset value of the base node ( |
@schomatis the offset is the offset from the start of the backing file, so it should likely be the offset of the base node. It might be helpful to look at the filestore code to see how PosInfo is used, in particular readDataObj (https://github.com/ipfs/go-ipfs/blob/master/filestore/fsrefstore.go#L152). |
@kevina Thanks for the pointer, it helps me understand Filestore internals. What I'm missing now is a use case for the Append function. From what I'm seeing in the code this function is related to the @whyrusleeping Maybe you could point me in the right direction to get more information about those subjects. My main concern now is to have a list of commands that would trigger an |
After reading the example cited above I run the following commands to trigger the
The error is due to a check in Thinking about this it makes sense this append operation fails because Filestore won't have a concrete file to back the appended data (except the My question then is if Filestore should support the append operation or if the |
Researching some more, the problem is not related to the way the input is passed to the
The problem is that the node passed to |
@schomatis I don't think we need to make the trickle append code support filestore. The |
Closing in favor of ipfs/boxo#389. |
Version information:
go-ipfs version: 0.4.10-00573cb2c
Repo version: 5
System version: amd64/windows
Golang version: go1.8.3
Type:
Bug
Severity:
Low-Medium
Description:
On my machine if I try to use --nocopy with the trickledag format it will still copy file blocks, as well as output a hash for the standard dag format, but even this behaviour is inconsistent. These are the cases I've tried and their results with a log below, the sample data is just 25M from udevrandom.
Nothing has been done yet, file is added with --nocopy
Result: As expected, file data is not copied to the datastore, standard hash returned
File has been added via --nocopy already, it is added again with --nocopy and -t
Result: File data is not copied, but standard dag hash returned, not trickle
Repo is cleaned, file is added with --nocopy and -t
Result: File data is copied, and standard dag hash returned
Repo is cleaned, file added with -t
Result: As expected, file data is copied to the datastore, trickle hash returned
In addition to this please look at the log below to see the blocks directory changing size, even after everything is removed it seems to have grown is size a few kb. I'm not sure if this is expected or not.
I haven't tested this elsewhere yet. I originally caught this after adding a lot of files like this
add --nocopy -r -w -Q --chunker=rabin --pin=false --cid-version=1 --hash=Blake2b-256
, -t was only provided conditionally (if more than half the files provided were multimedia files) so the arguments would turn intoadd --nocopy -r -w -Q --chunker=rabin --pin=false --cid-version=1 --hash=Blake2b-256 -t
, I don't think any of the other arguments there affect --nocopy like this.The text was updated successfully, but these errors were encountered: