mbdavid / LiteDB

LiteDB - A .NET NoSQL Document Store in a single data file

Home Page:http://www.litedb.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Use EnterTransaction() before EnterLock

390620652 opened this issue · comments

Version
5.019/OS/.NET 8. (REQUIRED)

Describe the bug
When I call Upsert function in two thread, this exception might occur occasionally.

---> LiteDB.LiteException: Use EnterTransaction() before EnterLock(name)
at LiteDB.Engine.EngineState.Validate()
at LiteDB.Engine.LiteEngine.AutoTransaction[T](Func2 fn) at LiteDB.LiteCollection1.Upsert(T entity)

Could you please provide a small repro?

The bug should have been resolved in v5.0.20