Skip to content

fix: tolerate stale object cache eviction entries - #9371

Open
Sanjays2402 wants to merge 2 commits into
invoke-ai:mainfrom
Sanjays2402:fix/object-serializer-stale-cache-id
Open

fix: tolerate stale object cache eviction entries#9371
Sanjays2402 wants to merge 2 commits into
invoke-ai:mainfrom
Sanjays2402:fix/object-serializer-stale-cache-id

Conversation

@Sanjays2402

Copy link
Copy Markdown

Summary

Fix stale object-cache eviction IDs causing save() to raise KeyError after a cached object is deleted. Eviction now ignores an ID that was already removed, with a regression covering the reported delete-then-save sequence.

Related Issues / Discussions

Closes #9370

QA Instructions

Run pytest tests/test_object_serializer_disk.py::test_obj_serializer_fwd_cache_save_after_deleting_cached_object.

Merge Plan

N/A

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

Deleting a cached object leaves its queued eviction identifier behind. Ignore that stale identifier when it reaches the front of the queue, and cover the reported delete-then-save sequence.
@github-actions github-actions Bot added python PRs that change python files services PRs that change app services python-tests PRs that change python tests labels Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python PRs that change python files python-tests PRs that change python tests services PRs that change app services

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: ObjectSerializerForwardCache.delete() leaves a stale cache ID that causes a later save() to raise KeyError

2 participants