LiteDB
LiteDB copied to clipboard
Update MemoryCache.cs
When readable page is updated from a writable page buffer, the ShareCounter was set to 1 before it is copied, but when writable page is discarded the Ensure will throw an exception because the ShareCounter isn't set to BUFFER_WRITABLE.
@mbdavid Can this fix be merged and released please? We are facing this issue with our product in production.
@mbdavid Can this fix be merged and released please? We are facing this issue with our product in production.
@mbdavid Can this fix be merged and released please? We are facing this issue with our product in production.
In LiteDB.Constants.ENSURE(Boolean conditional, String message)
In LiteDB.Engine.MemoryCache.DiscardPage(PageBuffer page)
In LiteDB.Engine.DiskService.DiscardDirtyPages(IEnumerable1 pages) In LiteDB.Engine.TransactionService.Rollback() In LiteDB.Engine.LiteEngine.AutoTransaction[T](Func2 fn)
In LiteDB.LiteCollection`1.Insert(T entity)
In Acctrue.PrintApp.Infrastructure.TaskJob.LiteDBTaskHandler.OnAdd(TaskInfo task) 在 E:\Work\Git\PrintAppDev\PrinterApp\PrintApp.Infrastructure\TaskJob\LiteDBTaskHandler.cs : 42 Line
在 FreeScheduler.Scheduler.AddTaskPriv(TaskInfo task, Boolean isSave)

@mbdavid Can this fix be reviewed and merged, please? We are also facing this issue in our production environment. There is another similar bug raised for this issue - https://github.com/mbdavid/LiteDB/issues/2184
Thank you!
@mbdavid We are facing the same issue with our production on multiple devices. Once this issue is faced, the only option is to delete and recreate the database, which is making things really difficult for us. Can we please review and merge this fix?