complexdatacollective / Server

A tool for storing, analyzing, and exporting Network Canvas interview data.
http://networkcanvas.com/
GNU General Public License v3.0
2 stars 2 forks source link

more robust database handline #349

Open rebeccamadsen opened 2 years ago

rebeccamadsen commented 2 years ago

When a database file fails to load for any reason, Server gives an error message and then exits. It would be better to handle corruption of the individual database files separately, and not have the whole app fail to launch when possible to continue. We should also explore ways to make processing the databases more robust if possible.

For example, when a database gets corrupted, "NUL" characters show up in the .db file and prevent processing. This is perhaps occurring when the app closed unexpectedly or too soon, or that there is a rare scenario where our write code is broken. Example issues that deal with the null data are here https://github.com/louischatriot/nedb/issues/480 and here https://github.com/louischatriot/nedb/issues/646.