Repository navigation
Releases: RuiNelson/libpcache
Release list
1.1.5
Version 1.1.5
Bug Fixes
-
Fixed FIFO eviction order being corrupted by explicit deletes. Deleting a page from a
FIFOvolume could leave a stray empty slot that hijacked the implicit cursor, causing subsequent writes to evict the newest pages instead of the oldest — or to evict prematurely while capacity remained. Every delete operation on aFIFOvolume now ends with a compaction pass that merges the holes into the cursor run while preserving the circular age order. Volumes left in an ambiguous state by a crash — or written by earlier library versions — are repaired automatically onpcache_open.Note for adopters: deletion on
FIFOvolumes is now a costly operation (up to O(live pages) of page copies per call). Batch deletions withpcache_delete_pagesorpcache_delete_pages_rangeto amortize the cost.FIXEDvolumes are unaffected. -
Fixed
pcache_check_pages_rangeleaving*count_outuntouched when failing withPCACHE_CHECK_RANGE_INVALID_RANGE; it is now set to zero on every error return, matchingpcache_get_pages_range. -
Fixed I/O errors from short reads/writes (e.g. a data file truncated by a crash) being reported with
posix_error == 0or a staleerrno; short transfers now reportEIOand real errors keep theirerrno. -
Fixed a potential out-of-bounds write in the
*_with_counterfunctions on platforms with a 32-bitsize_t(e.g.arm64_32), where a hugepositionvalue could wrap past the bounds check. -
Fixed
pcache_opensilently ignoring a failure of the row-count query, which could send later FIFO writes down the fill-up path and insert rows beyondmax_pages; the open now fails instead.
1.1.4
Version 1.1.4
Bug Fixes
- Hardened atomic batch page writes (
pcache_put_pagesand counter variant). If a data-file write or index commit fails after an existing slot is overwritten, the original bytes of every pre-existing live page are now restored before the function returns. Whenfail_if_existsistrue, intra-batch duplicate identifiers are also rejected before any I/O begins. - Fixed a consistency bug in
pcache_set_max_pageswhere anfsync/checkpoint failure after a successful metadata commit could leave the in-memorymax_pagesvalue out of sync with the persisted configuration. The in-memory value is now updated immediately after the metadata COMMIT. - Fixed
pcache_get_pages_rangeto zero*count_outup front so the output is well-defined on every error return (INVALID_RANGE,BUFFER_TOO_SMALL), matchingpcache_check_pages_range. pcache_opennow rejects volumes whose persistedpage_size,max_pages, orid_sizeis zero withPCACHE_OPEN_CORRUPT.
1.1.3
Version 1.1.3
Bug Fixes
- Fixed spurious I/O errors on durable deletes. After a successful page lookup, the internal
find_rowidstatement kept an open read cursor, leaving a lingering read transaction on WAL databases. That blocked a subsequentsqlite3_wal_checkpoint_v2(SQLITE_CHECKPOINT_RESTART)withSQLITE_LOCKED, surfacing as an I/O error to callers performing durable deletes.
1.1.2
Bug Fixes
pcache_set_max_pagesupdated the in-memorymax_pagesbefore confirming the durable sync; on I/O failure the caller received an error butpcache_inspect_configurationwould already return the new value.pcache_set_max_pagesacceptednew_max_pages = 0, silently writing an invalid capacity to both the in-memory configuration and the on-disk metadata. Passing zero now fails immediately withPCACHE_SET_MAX_PAGES_INVALID_ARGUMENT.pcache_inspect_configurationwas documented as returning the configuration frozen at open time; the documentation now reflects thatpcache_set_max_pagescan update it at runtime.
1.1.1
Bug Fixes
sqlite_errorwas incorrectly set on successful calls topcache_check_pages_rangeandpcache_get_pages_range.fsyncfailures reported a genericEIOinstead of the actual error code.- Opening more than 16 volumes concurrently could cause crashes or silent data corruption in other threads.
pcache_inspect_configurationandpcache_inspect_page_countwere documented under the wrong names in the specification.pcache_with_counterrejected valid arguments on 32-bit platforms.
1.1.0 - Introduction of the REPL utility
docs(repl): complete README with full command reference Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>