You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation of the coreunix.Add method claims to pin the object to the local data store but it doens't seem to do so.
After adding a file using :
// r is a reader from a filehash, err:=coreunix.AddWithContext(ctx, service.node, r)
iferr!=nil {
panic("error adding file")
}
fmt.Println(hash)
I'm trying to make sure the object is pinned using ipfs pin ls but this command returns nothing
I can cat the file with ipfs cat <hash> but after doing ipfs repo gc
trying to cat the file again fails with Error: merkledag: not found which proof the object was not pinned
The text was updated successfully, but these errors were encountered:
zaibon
changed the title
coreunix.Add is document that is pin object but it doesn't
coreunix.Add is documented to pin objects but it doesn't
Dec 5, 2016
So, the coreunix.Add*() functions used to pin before 0.4.0, but in the huge overhaul of add, importer, pinning, and with the introduction of GC, it was decided the default behaviour on the library layer should be to not pin. Only the CLI and (under certain circumstances) end-user apps should pin by default.
The documentation simply slipped through, so thanks for catching that :)
Version information:
Type: Bug
Priority: P5
Description:
The documentation of the coreunix.Add method claims to pin the object to the local data store but it doens't seem to do so.
After adding a file using :
I'm trying to make sure the object is pinned using
ipfs pin ls
but this command returns nothingI can cat the file with
ipfs cat <hash>
but after doingipfs repo gc
trying to cat the file again fails with
Error: merkledag: not found
which proof the object was not pinnedThe text was updated successfully, but these errors were encountered: