Skip to content

1.1.5

Latest

Choose a tag to compare

@RuiNelson RuiNelson released this 08 Jul 10:23

Version 1.1.5

Bug Fixes

  • Fixed FIFO eviction order being corrupted by explicit deletes. Deleting a page from a FIFO volume 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 a FIFO volume 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 on pcache_open.

    Note for adopters: deletion on FIFO volumes is now a costly operation (up to O(live pages) of page copies per call). Batch deletions with pcache_delete_pages or pcache_delete_pages_range to amortize the cost. FIXED volumes are unaffected.

  • Fixed pcache_check_pages_range leaving *count_out untouched when failing with PCACHE_CHECK_RANGE_INVALID_RANGE; it is now set to zero on every error return, matching pcache_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 == 0 or a stale errno; short transfers now report EIO and real errors keep their errno.

  • Fixed a potential out-of-bounds write in the *_with_counter functions on platforms with a 32-bit size_t (e.g. arm64_32), where a huge position value could wrap past the bounds check.

  • Fixed pcache_open silently ignoring a failure of the row-count query, which could send later FIFO writes down the fill-up path and insert rows beyond max_pages; the open now fails instead.