-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Detected loop in FindAll({0}) #2525
Comments
I had this problem too. I tried to move the 'db' file out of the original path, run the program once to generate a new 'db' file, and finally overwrite the moved 'db' file back, and everything worked. |
Just BTW, not regarding your issue, but it might be possible to improve the provided code by maybe better performance and clarity. If it's really necessary to use List, ignore this one. But you can improve memory efficiency and lazily load all the entries. I am not an expert on LiteDB so this might cause issues since you are rebuilding it right after. Also, you can modify |
I have the same problem. It happens if any table on rebuild has more than 2550 records. Here is why:
I'm not sure how to properly fix it. The easiest way would be to just pass the correct |
This property was added in version 5.0.019 and I believe it is causing that calculation to be incorrect.
In my case I have a collection with 5000+ documents and my application is collapsing. Possibles workaround:
@mbdavid I know you are not involved in the project anymore and that's great, but could you at least give us a hint on how to solve it or how we can at least apply a temporary solution? --> 663f749 Thank you so much!! :D |
Version
.Net 8.0
LiteDB.dll 5.0.21.0
Describe the bug
About 16000 records in file. File size 33MB
Code to Reproduce
line db.Rebuild(); throws error below:
at LiteDB.Engine.IndexService.FindAll(CollectionIndex index, Int32 order)+MoveNext()
at LiteDB.LinqExtensions.<>c__DisplayClass2_0
2.<<DistinctBy>g___|0>d.MoveNext() at LiteDB.Engine.LiteEngine.<>c__DisplayClass5_0.<EnsureIndex>b__0(TransactionService transaction) at LiteDB.Engine.LiteEngine.AutoTransaction[T](Func
2 fn)at LiteDB.Engine.LiteEngine.EnsureIndex(String collection, String name, BsonExpression expression, Boolean unique)
at LiteDB.Engine.LiteEngine.RebuildContent(IFileReader reader)
at LiteDB.Engine.RebuildService.Rebuild(RebuildOptions options)
at LiteDB.Engine.LiteEngine.Rebuild(RebuildOptions options)
at LiteDB.LiteDatabase.Rebuild(RebuildOptions options)
The text was updated successfully, but these errors were encountered: