Skip to content

Commit

Permalink
Merge pull request #2227 from rainman-306/bugfix_LiteDB_ENSURE_discar…
Browse files Browse the repository at this point in the history
…ded_page_must_be_writable_2184
  • Loading branch information
mbdavid authored Dec 16, 2022
2 parents 9447335 + e5e5a6f commit 9199da0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions LiteDB/Engine/Disk/MemoryCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ public PageBuffer MoveToReadable(PageBuffer page)

added = false;

// Bug 2184: readable page was updated, need to set the page.ShareCounter back to writeable
// so that DiscardPage can free the page and put it into the queue.
page.ShareCounter = BUFFER_WRITABLE;

return current;
});

Expand Down

0 comments on commit 9199da0

Please # to comment.