Files
turso/core
Alecco bdf427c329 page_cache: proper error handling for deletions
Add error handling and results for insert(), delete(), _delete(),
_detach(), pop_if_not_dirty(), and clear.

Now these functions fail if a page is dirty, locked, or has other
references.

insert() makes room with pop_if_not_dirty() beforehand to handle
cache full and un-evictable, else it would evict this page
silently.

_delete() returns Ok when key is not present in cache and it tries
first to detach the cache entry and clean its page *before*
removing the entry from the map.

detach() checks firstt if it's possible to evict the page and if
there are no other references to the page before taking its
contents.

test_detach_via_delete() and test_detach_via_insert() fixed by
properly checking before and after dropping the page reference.

test_page_cache_fuzz() fixed by reordering and moving reference to
the page into insert.

Other page cache tests fixed to check new function results.

All page cache tests pass.

Error handling and test fixes for Pager and BTree will be added in
a subsequent commit.
2025-05-21 14:09:39 +02:00
..
2025-05-10 22:23:01 -03:00
2025-05-15 09:59:46 +03:00
2025-05-15 09:59:46 +03:00
2025-03-25 17:13:31 +02:00
2025-04-23 08:34:58 -03:00
2025-05-15 09:59:46 +03:00
2025-01-28 14:55:38 -05:00
2025-04-24 11:05:21 +03:00
2025-01-28 14:55:38 -05:00
2025-05-15 09:59:46 +03:00
wip
2025-03-29 22:02:49 +01:00
2024-12-24 18:04:30 +01:00