-
-
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
"ipfs get" using the Filestore #3981
Comments
This should be doable, though it will be difficult. We could potentially do this by adding some sort of signaling method to the filestore that says "when you get a block by this hash, you should add it to the filestore with this filepath and offset". Thoughts @kevina ? |
Bypassing the "cache" would be difficult. Copying something in the cache to disk without rehashing is fairly straightforward. At least it was on my implementation as I already implemented it https://github.com/ipfs-filestore/go-ipfs/blob/master/filestore/util/move.go. Since the current implementation differs from mine i am not 100% sure how useful my code is. |
@kevina the difference is that its not being moved to the disk after the fact, we want to write it to the file as its being fetch, avoiding the blockstore entirely |
@whyrusleeping What I had in mind was to write in the blockstore until the file is complete, then write to the file without recomputing its hash, and clear the blockstore. |
@progval ah, that could be done with first fetching the file with The problem there though is that running that gc has the unintended side effect of cleaning out the entire blockstore, which you don't necessarily want. removing blocks from the blockstore after the download is equally as difficult (Requires computing the entire pinset to make sure the blocks we want to remove arent pinned by other things already). I'm actually thinking that the best (and though maybe not the easiest, but the least problematic) option might actually be to try and stream from bitswap straight into the filestore (bypassing the blockstore as i suggest above). |
@whyrusleeping there is the |
|
I think doing |
@whyrusleeping |
Great! I think that will be an exciting feature
…On Thu, Aug 31, 2017, 4:17 PM Kevin Atkinson ***@***.***> wrote:
@whyrusleeping <https://github.com/whyrusleeping> ipfs filestore mv
should be fairly easy, I created a new issue for it #4193
<#4193>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3981 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABL4HLIGKYLzQrHeAJzX8R7B2kJSfeQlks5sdz7ygaJpZM4N6N5r>
.
|
@kevina While you are moving forward with |
Is the work on this stalled yet? |
It looks like there was a start in #4261 but we'd also need something to then remove the file from the blockstore. |
One thing keeps rolling in my mind: if the remote file wasn't "raw-leaves"
then will filestore be able to provide the identical hashes?
|
Yes? But how would one do that? |
"ipfs add" can use --chunker or --raw-leaves or not
ps:
|
Another thing this can provide is a --pin option on |
Just a little "me too" reply, but with a reason why i want this feature. In my usecase i'm syncing data between two IPFS nodes (using syncthing). This data is large per file (up till tens of gigabytes per file) which i only want to have once on my hdd.
While that solution works, it's not sane because you have to |
Type:
Enhancement
Severity:
Medium
Description:
ipfs add
now has an experimental--no-copy
option, which allows to make a file/directory known to IPFS, and serve it to other peers from its original place on the hard disk.Could you add a similar feature to
ipfs get
to write files to the filesystem, without adding them in~/.ipfs
too (assuming they are not already there)?Thanks!
The text was updated successfully, but these errors were encountered: