Skip to content
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

Update MemoryCache.cs #2227

Conversation

rainman-306
Copy link
Contributor

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.

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.
@snarayanapura
Copy link

@mbdavid Can this fix be merged and released please? We are facing this issue with our product in production.

1 similar comment
@Jyoti1682
Copy link

Jyoti1682 commented Nov 9, 2022

@mbdavid Can this fix be merged and released please? We are facing this issue with our product in production.

@sgf
Copy link

sgf commented Nov 16, 2022

@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)

图片

ProKn1fe added a commit to ProKn1fe/LiteDB that referenced this pull request Nov 22, 2022
@surajitkarmakar
Copy link

@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 - #2184

Thank you!

@davisannie
Copy link

@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?

@mbdavid mbdavid merged commit 9199da0 into litedb-org:master Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants