Repository navigation
fix(caching): preserve missing results when restoring in-memory caches - #1826
Open
JustinBinber wants to merge 1 commit into
Open
JustinBinber wants to merge 1 commit into
JustinBinber wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restoring a partial result cache into memory can turn missing values into successful
Nonecache hits, so the Driver returns incorrect results instead of recomputing them. Closes #1825.Changes
Noneresult only if its version exists in the source store; non-Noneresults retain a single read.Nonevalues.How I tested this
{'answer': None}instead of{'answer': 42}; all six store/selection cases incorrectly reported a missing result as present.python -m pytest -q tests/caching/result_store tests/caching/metadata_store tests/caching/test_integration.py tests/caching/test_adapter.py: 88 passed, including the existing threading/multiprocessing cases. One existing warning concerns the trusted pickle test fixture.prekhooks pass for all three files, including Ruff 0.16.9, formatting, whitespace, AST and license checks.git diff --checkpasses.Notes
No API signatures, dependencies or cache serialization formats change. Loading remains a non-atomic operation if the source is concurrently modified.
Checklist