-
-
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
some local hash is not listed by ipfs refs local #1554
Comments
huh, query must be broken, or something. |
we're apparently getting some bad keys back from the datastore, or something... adding an error log to the
|
It appears that some of the 'keys' coming up from the datatstore query are one character short, for example, a good key: (bytes)
And a bad key (from the datastore):
The bad key is 33 bytes long while the good key is 34. |
There is a bug in the encode/decode code here: https://github.com/jbenet/go-datastore/blob/master/flatfs/flatfs.go#L50 some of the filenames are shorter than the others, a byte is being left off somewhere in the process. |
@whyrusleeping good work.
|
before merging a fix for this, we should try to make a test that repros it. |
found it: any key that ends in the byte 47, aka |
@whyrusleeping yep. makes sense. we need our own clean (+test). silly not to have considered it before. |
this is needed before dev0.4.0 to ensure a correct migration |
Would something like this do the trick ? The other way I thought would be to somehow have escape character to avoid the clean of |
@whyrusleeping i think you had a plan for this, right? |
This has been resolved, it was the flatfs path.Clean bug |
$ ipfs get QmUYndb1SkY49khYAg9Zn2yp9Z44cRFtqMnVAZP5qes8ce
$ ipfs refs local | wc -l
181
$ ipfs refs local | grep -i QmUYndb1SkY49khYAg9Zn2yp9Z44cRFtqMnVAZP5qes8ce
return nothing
It's a file part of the WebUI and is correctly written on my filesystem. Reproduced on different machine, and by @jbenet.
The text was updated successfully, but these errors were encountered: