Not suitable for real scenarios
Thanks David for your work, but currently it's not suitable for a real life product. In my app almost all the bugs come from inside the LiteDB. Lots of ArgumentNullExceptions and bugs that come after closing the app or using it in asynchronous operations.
I tried it in a Windows 10 app and now searching for alternatives.
Hope you make it more stable.
Regards.
Hey,
Strange, I have no such problems, after using this for a year in a few different project.
bugs that come after closing the app or using it in asynchronous operations.
If you start async task, you are also responsible for canceling them and/or waiting for them to close.
Lots of ArgumentNullExceptions
These also depend on your models and how you implement them and if you change models in the middle of development and there are old ones in db already, you have to make them backwards compatible or update your DB.
There are some concurrency issues with LiteDB that should be fixed, and afaik @mbdavid is working on them (otherwise you need to use external synchronization primitives).
Those kinds of issues reported here, usually suggest invalid usage of the library, and not the bugs in the library itself.
they are mostly concurrency issues.. Later I'll write stack traces here for record.
errors like "Unable to cast object of type 'LiteDB.EmptyPage' to type 'LiteDB.HeaderPage'" is not really something I can do anything about in my code.
Yup: 'Unable to cast object of type 'LiteDB.EmptyPage' to type 'LiteDB.HeaderPage'"' is definitely a concurrency error. There are also some others...
I am currently dealing with it by using mutex when modifying anything inside LiteDB and it does never happen.
Hi guys, that not my first issue about "not ready for production". I know that everyone wants a "bugs-free" library, especially in a database storage system. If you need this (and I agree that this is important thing) try other options, like sqlite. Sqlite has more than 15 year (or more) are very stable.
LiteDB has bugs and, when I have time, i try to fix it. Some error (like this concurrency problem) are hard to detect and fix. I'm current working in a solution for this in nojournal branch. Probably I will need remove features to this, like transaction and increment auto id.
The "Unable to cast object of type 'LiteDB.EmptyPage' to type 'LiteDB.HeaderPage'" is a concurrency problem that occurs when a write thread/process is writing and another thread are reading (and than read dirty pages).
Hi @mbdavid , Yes I understand, nothing is bug-free.
I'll write here stack traces that I've collected from usage of thousands of users. hope that help.
Is this issue obsolete? I'm thinking it is, with all the work that went into concurrency in v4.
Maybe it should be closed, as it is a bit scary to see when considering LiteDB for a project. :)
I bet it is obsolete. Was using LiteDB in big data scenarios, automation orchestration etc. No issues whatsoever: handles external faults gracefully, insertion performance is not good though, but overall is a nice thing. I wonder why this issue is still open as well.