Closed adam-hanna closed 6 years ago
This may be related to https://github.com/ipfs/go-ds-flatfs/issues/22 and https://github.com/ipfs/go-ds-flatfs/issues/40. I highly recommend you try go-ds-badger.
Great, thanks! Any reason you suggest badger vs leveldb?
IIRC, badger supports large objects better. However, I really don't know why we decided to go with switch to badger versus stick with leveldb.
Why this is happening: When we use this datastore, we make sure to "mount" it under /blocks
using a special "mount" datastore. This means that all keys are rooted at /
, not /blocks/
(as they are in this case). That flattens the directory structure.
We could fix this, but, IMO, it's not worth putting too much effort into this datastore as it will always be slow.
Thanks for all of the help. I switched over to your level-db implementation and it was "plug and play"! Thanks so much!
Not sure if a gh issue is the best place for this. If there is a better place to ask questions, please let me know.
I'm getting the following error in my console when I try to add blocks to storage:
rename /home/adam/.c3/bloc/put-030046100 /home/adam/.c3/bloc/blocks/AEJRGQAVONZMVAZRM3WS74JSE2DDK3PDFNEHFBAPPVJM4ZM5DNKG7FF77AYU3PBSHCR5CXZSWWSDW45MIYN64HWE4YJ64RQYUDGK7ZY5NMR2Y.data: no such file or directory
The error in question is happening from the
bservice.AddBlock(basicIPFSBlock)
line.I was hoping that
flatfs.CreateOrOpen(...)
would do everything it needed, but maybe I'm implementing it incorrectly?If I
$ mkdir /home/adam/.c3/bloc/blocks && touch /home/adam/.c3/bloc/blocks/AEJRGQAVONZMVAZRM3WS74JSE2DDK3PDFNEHFBAPPVJM4ZM5DNKG7FF77AYU3PBSHCR5CXZSWWSDW45MIYN64HWE4YJ64RQYUDGK7ZY5NMR2Y.data
everything works.Thanks for your help
The important snippets of my code in question: fsstore/fsstore.go
foo/foo.go