31 ms·
How do you deal with the corruption issue of NeDB? From their page: > corruptAlertThreshold (optional): between 0 and 1, defaults to 10%. NeDB will refuse to
by chris_st 10y ago
How do you deal with the corruption issue of NeDB? From their page:
> corruptAlertThreshold (optional): between 0 and 1, defaults to 10%. NeDB will refuse to start if more than this percentage of the datafile is corrupt. 0 means you don't tolerate any corruption, 1 means you don't care.
I personally don't want a database that "allows" corruption at any level. I understand that there are going to be bugs, but this seems different to me.
- jamespetercook 10y agoYeah that worried me but I just presumed all persisted data is at risk of corruption, and the library simply provided some options to help manage it. Im not really very clued up in this area though. Does the way NeDB saves data (serialised json to plain text files) increase the chances of corruption? I don't really know how I'd handle a corrupt data file