Skip to content

FIX: write disk cache files atomically - #508

Merged
redeboer merged 4 commits into
mainfrom
fix/atomic-cache-writes
Sep 2, 2026
Merged

FIX: write disk cache files atomically#508
redeboer merged 4 commits into
mainfrom
fix/atomic-cache-writes

Conversation

@redeboer

@redeboer redeboer commented Sep 2, 2026

Copy link
Copy Markdown
Member

Closes #506

🐛 Bug fixes

  • Cache files are now written to a temporary file in the same directory and moved into place with os.replace(), so a concurrent reader never observes a half-written file.
  • A cache file that is empty or otherwise unreadable is now ignored with a warning and recomputed, instead of raising from pickle.load().
  • A failing cache write (full or read-only cache directory, or a locked destination file) no longer discards an already-computed result: it is logged as a warning and the result is returned uncached.

🖱️ Developer experience

  • The Sphinx linkcheck builder now allows 60 seconds per link instead of the 30-second default, which was causing spurious CI failures on slow-responding hosts such as zenodo.org.

Squash commit messages

* DX: increase Sphinx linkcheck timeout
* FIX: keep computed result when cache write fails

@redeboer redeboer added this to the 0.16.1 milestone Sep 2, 2026
@redeboer redeboer self-assigned this Sep 2, 2026
@redeboer redeboer added the 🐛 Bug Something isn't working label Sep 2, 2026
@redeboer redeboer added the 🖱️ DX Improvements to the Developer Experience label Sep 2, 2026
@redeboer
redeboer merged commit 49ad8ea into main Sep 2, 2026
23 checks passed
@redeboer
redeboer deleted the fix/atomic-cache-writes branch September 2, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 Bug Something isn't working 🖱️ DX Improvements to the Developer Experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write cache files atomically to survive concurrent access

1 participant