btrask / stronglink

A searchable, syncable, content-addressable notetaking system
Other
1.04k stars 45 forks source link

Verify database back-end before opening repo DB #83

Open btrask opened 8 years ago

btrask commented 8 years ago

We currently support a variety of database back-ends, mainly MDB and LevelDB. Currently these on-disk representations don't conflict, meaning that if you try to use the wrong one, you'll just get an error. However it's possible that other back-ends could accidentally delete files or cause corruption, if you use the wrong back-end to open the wrong repo. We should store the back-end used outside of the database itself so we can verify it before opening anything.

This might be expanded to run-time back-end switching in the future, too.