Skip to content

[FIX] items in ParentCache can be cleared by callback twice#960

Open
PatrykWalach wants to merge 2 commits into
isographlabs:mainfrom
PatrykWalach:cache-item-bug
Open

[FIX] items in ParentCache can be cleared by callback twice#960
PatrykWalach wants to merge 2 commits into
isographlabs:mainfrom
PatrykWalach:cache-item-bug

Conversation

@PatrykWalach

Copy link
Copy Markdown
Member

No description provided.

@PatrykWalach PatrykWalach marked this pull request as draft February 1, 2026 13:12
@dosubot

dosubot Bot commented Feb 1, 2026

Copy link
Copy Markdown

Related Documentation

No published documentation to review for changes on this repository.

Write your first living document

How did I do? Any feedback?  Join Discord

@PatrykWalach PatrykWalach marked this pull request as ready for review February 7, 2026 16:33
@PatrykWalach PatrykWalach changed the title fix(cache): mark Uncleared items as ClearedByCallback fix items in ParentCache can be cleared by callback twice Feb 15, 2026
@PatrykWalach PatrykWalach changed the title fix items in ParentCache can be cleared by callback twice fix: items in ParentCache can be cleared by callback twice Mar 1, 2026
@PatrykWalach PatrykWalach changed the title fix: items in ParentCache can be cleared by callback twice [FIX] items in ParentCache can be cleared by callback twice Mar 1, 2026

expect(() => {
disposeTemporaryRetain();
}).toThrow();

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this test it would throw A temporary retain was cleared, for which the CacheItem is in an invalid state. but at runtime it was possible to go into a different branch and cause issues (temporary retain count could have been decremented more than once).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant