-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Associate tagged keys with entries so replacements are not evicted #61529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs
Outdated
Show resolved
Hide resolved
src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs
Outdated
Show resolved
Hide resolved
src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs
Outdated
Show resolved
Hide resolved
src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs
Outdated
Show resolved
Hide resolved
src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs
Outdated
Show resolved
Hide resolved
src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs
Outdated
Show resolved
Hide resolved
As a starting point this should target |
…he do not have their tags removed on eviction. Fixes dotnet#61524
3f4849d
to
ee019d9
Compare
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes LGTM.
/azp run |
Commenter does not have sufficient privileges for PR 61529 in repo dotnet/aspnetcore |
Anything more I need to do to get a review and keep this PR from going stale? |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
@sebastienros any chance of a code review? |
src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs
Outdated
Show resolved
Hide resolved
src/Middleware/OutputCaching/test/MemoryOutputCacheStoreTests.cs
Outdated
Show resolved
Hide resolved
src/Middleware/OutputCaching/test/MemoryOutputCacheStoreTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Rick Anderson <[email protected]>
Co-authored-by: Rick Anderson <[email protected]>
Test failures seem transient? And unrelated to this change. Any way to re-run? |
I use the brute force approach, Close/open the PR. |
Associate tagged keys with entries so replacements are not evicted
MemoryOutputCacheStore
will now only remove tags from the associated eviction, rather than all tags associated with the key.Description
A previous PR (#43728) fixed a memory leak by removing tags upon eviction from the
MemoryOutputCacheStore
.That fix created a bug where if an entry is replaced rather than evicted via timeout, the tags associated with the replacement would erroneously be deleted and the new entry would have no tags.
This PR associates each tag with a specific entry. When the PostEvictionCallback is run, only the associated tags with that specific eviction will be removed.
I based this on release/8.0 branch, I assume it can be merged into
release/8.0
,release/9.0
, andmain
.Fixes #61524