I copied a version of the database file that had an example of an application bug I've been chasing in it, for future analysis, but didn't change the folder immediately.
cp 4750.cub blah.cub
As soon as the next compaction started, the entire app crashed and couldn't restart, dying with:
The app immediately hit max restart intensity and died completely.
I thought I remembered a function that was supposed to weed out non-hex filenames, and I found it: CubDB.cubdb_file?/1, but quickly realized that the regex in it is wrong:
/[\da-fA-F]+/ will match anything that has at least one hex character in it. ('b' or 'a' from 'blah' above)
/^[\da-fA-F]+$/ will match any hex-only string, which is what I think you wanted.
I've got a couple tests and a fix ready for you, I'll submit a PR in just a bit.
I copied a version of the database file that had an example of an application bug I've been chasing in it, for future analysis, but didn't change the folder immediately.
cp 4750.cub blah.cub
As soon as the next compaction started, the entire app crashed and couldn't restart, dying with:
The app immediately hit max restart intensity and died completely.
I thought I remembered a function that was supposed to weed out non-hex filenames, and I found it:
CubDB.cubdb_file?/1
, but quickly realized that the regex in it is wrong:/[\da-fA-F]+/
will match anything that has at least one hex character in it. ('b' or 'a' from 'blah' above)/^[\da-fA-F]+$/
will match any hex-only string, which is what I think you wanted.I've got a couple tests and a fix ready for you, I'll submit a PR in just a bit.