StrangeLoopGames / EcoIssues

131 stars 21 forks source link

LiteDB Exceptions very vauge #11882

Closed joamla96 closed 2 years ago

joamla96 commented 5 years ago

Hi

My server had started to spew out two Errors:

[01:39:12] Error writing to stat database: LiteException Cannot insert duplicate key in unique index '_id'. The duplicate value is '71183'. [01:39:19] Error writing to stat database: LiteException Cannot insert duplicate key in unique index '_id'. The duplicate value is '280563'.

It started after my server had physically crashed. It does not seem to have any adverse effects on the server, so far it's run 48h with the errors, so thankfully nothing fatal, just rather annoying to see in the console.

I'm looking through the database file right now, trying to find the keys it's having issues with, but if i had some more information about which specific database it was in, it would have been alot easier.

mirasrael commented 5 years ago

This issue refers to broken database. Actually, seems like LiteDB journal didn't save us from DB crashes (and from code it seems like this).

mirasrael commented 5 years ago

It was improved in 9.0, but to fully fix this issue we at least should move to next version of LiteDB which isn't yet released. So put it to Backlog for now.

Daniel-Magulado commented 2 years ago

Hi @joamla96

This issue should be fixed now. Feel free to submit another bug report if this is still the case for you.