Open gasparecoolshop opened 4 years ago
@lbnascimento if you need a corrupted database where this problem occurred, I can provide you one in private
@gasparecoolshop Out of curiosity, are you using the repository pattern (https://github.com/mbdavid/LiteDB/wiki/Repository-Pattern) or are you using the database as a singleton?
We're using the repository pattern but on multiple threads. It seems the likely culprit would be some kind of concurrency issue. Makes me wonder if using a concurrency protected singleton might solve the issues in the short term. Any thoughts?
I have the same problem. Using LiteDB in conjuction with the singleton pattern. Problem occurs very rarely but enough for it to be annoying.
Is there a way to recover from this? I.E being able to identify what collection is causing the problem and dropping/recreating?
Version LiteDB 5.0.9 WPF with NetCore3.1 Xamarin with Mono 6.12
Describe the bug When trying to execute a query after the app started, a LiteDB.LiteException is thrown:
Invalid Data on 263. Full zero: False. Page Type: Empty. Prev/Next: 4294967295/262. UniqueID: 94. ShareCounter: 1.
Code to Reproduce Couldn't reproduce systematically, it happens rarely. The first query executed by the app is always:
Some EnsureIndex are executed before this query, including the one for "$.seq"
Screenshots/Stacktrace