Skip to content

fix: The new SeparateBodyFileCache design makes updates/reads non-atomic (#324)#435

Closed
princ0301 wants to merge 1 commit into
psf:masterfrom
princ0301:fix-324-the-new-separatebodyfilecache-design-mak
Closed

fix: The new SeparateBodyFileCache design makes updates/reads non-atomic (#324)#435
princ0301 wants to merge 1 commit into
psf:masterfrom
princ0301:fix-324-the-new-separatebodyfilecache-design-mak

Conversation

@princ0301

Copy link
Copy Markdown

Fixes #324

Summary

Fixes non-atomic updates/reads for SeparateBodyFileCache by ensuring the body is written before metadata. On read, it now verifies that both metadata and body files are present, treating an entry as invalid if the body is missing.

Validation

Tests passing after 1 attempt(s).

tests/test_expires_heuristics.py ................                        [ 59%]
tests/test_max_age.py ..                                                 [ 61%]
tests/test_redirects.py ....                                             [ 65%]
tests/test_regressions.py ..                                             [ 67%]
tests/test_serialization.py ..........                                   [ 77%]
tests/test_server_http_version.py .                                      [ 78%]
tests/test_storage_filecache.py ..................                       [ 96%]
tests/test_storage_redis.py ...                                          [ 99%]
tests/test_vary.py .                                                     [100%]
============================= 101 passed in 2.98s ==============================

@woodruffw woodruffw closed this Jun 16, 2026
@psf psf locked as spam and limited conversation to collaborators Jun 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The new SeparateBodyFileCache design makes updates/reads non-atomic

2 participants