Skip to content
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

[Cache] Fix versioned namespace atomic clears #35803

Merged
merged 1 commit into from Feb 24, 2020
Merged

[Cache] Fix versioned namespace atomic clears #35803

merged 1 commit into from Feb 24, 2020

Conversation

trvrnrth
Copy link

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
License MIT

When using namespace versioning to achieve atomic cache clears, only delete cache keys matching the old/current version.

This resolves tag inconsistency issues whereby the process running the clear would delete keys set against the new version by more recently spawned concurrent processes. Most seriously this could result in newly set data keys remaining, but with empty associated tag sets meaning the invalidation via tags was no longer possible.

Clearing specific prefixes is not supported when using versioned namespaces as it is desirable to clear all old keys as they will no longer be used and would otherwise eventually fill cache memory.

When using namespace versioning to achieve atomic cache clears, only
delete cache keys matching the old/current version.

This resolves tag inconsistency issues whereby the process running the
clear would delete keys set against the new version by more recently
spawned concurreny processes. Most seriously this could result in newly
set data keys remaining, but with empty associated tag sets meaning the
invalidation via tags was no longer possible.

Clearing specific prefixes is not supported when using versioned
namespaces as it is desirable to clear all old keys as they will no
longer be used and would otherwise eventually fill cache memory.
@trvrnrth trvrnrth changed the title Fix versioned namespace atomic clears [Cache] Fix versioned namespace atomic clears Feb 22, 2020
@chalasr chalasr added this to the 4.4 milestone Feb 23, 2020
@nicolas-grekas
Copy link
Member

Thank you @trvrnrth.

@nicolas-grekas nicolas-grekas merged commit c0caef1 into symfony:4.4 Feb 24, 2020
@trvrnrth trvrnrth deleted the fix-versioned-namespace-clear branch February 26, 2020 08:37
This was referenced Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants