LiteDB icon indicating copy to clipboard operation
LiteDB copied to clipboard

[BUG] DIspose() won't dispose sometimes. Throws exception

Open arunprakashn opened this issue 1 year ago • 1 comments

Version 5.0.21

Describe the bug Does not DIspose properly sometimes.

Code to Reproduce Unable to provide. This is a high throughput read/write but protected with "lock" statements

Expected behavior Should Dispose properly

System.Exception: LiteDB ENSURE: discarded page must be writable at LiteDB.Constants.ENSURE(Boolean conditional, String message) at LiteDB.Engine.MemoryCache.DiscardPage(PageBuffer page) at LiteDB.Engine.DiskService.DiscardDirtyPages(IEnumerable`1 pages) at LiteDB.Engine.TransactionService.Dispose(Boolean dispose) at LiteDB.Engine.TransactionMonitor.Dispose() at LiteDB.Engine.LiteEngine.Dispose(Boolean disposing) at LiteDB.Engine.LiteEngine.Dispose() at LiteDB.LiteDatabase.Dispose(Boolean disposing) at LiteDB.LiteDatabase.Dispose()

arunprakashn avatar Dec 07 '24 02:12 arunprakashn

this looks like it is the same issue as this.

https://github.com/litedb-org/LiteDB/issues/2528

dos-ise avatar Jan 07 '25 09:01 dos-ise