mbdavid / LiteDB

LiteDB - A .NET NoSQL Document Store in a single data file
http://www.litedb.org
MIT License
8.36k stars 1.22k forks source link

LiteDB Constructor fails when trying to load huge DB file 50GB #2441

Open msbasanth opened 3 months ago

msbasanth commented 3 months ago

Version 5.0.16

Describe the bug LiteDB Constructor fails when trying to load a huge DB file 50GB.

Database = new LiteDatabase("C:\\test.localdb", BsonMapper);

When I debug the breakpoint reaches till here and then fails (some internal error) not thrown as exception. But the execution continues.

Code to Reproduce

Serializer = new BsonSerializer();
BsonMapper = Serializer.CreateMapper();
Database = new LiteDatabase("C:\\test.localdb", BsonMapper);

Here the test.localdb is >50GB in size.

Expected behavior Should be able to handle DBs of size >50Gb

Screenshots/Stacktrace No exception thrown so as to capture it, but the instance is corrupted then onwards.

Any DB size limitation because of which we are unable to load liteDB DB or create a litedb instance in memory? Does it try to load the file in memory when constructor is running?