Skip to content

[Cache] fix logic for fetching tag versions on TagAwareAdapter #27158

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

Merged
merged 1 commit into from
May 5, 2018

Conversation

dmaicher
Copy link
Contributor

@dmaicher dmaicher commented May 4, 2018

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #27147
License MIT
Doc PR -

There was a problem introduced in #27007 which breaks tag invalidation.

From what I can see there were some cases when the actual tag versions were never fetched from the tags pool and version=0 was used.

@nicolas-grekas this is my attempt of understanding the logic within TagAwareAdapter. Please have a look if this makes sense to you 😉

}

if (!isset($this->knownTagVersions[$tag])) {
$fetchTagVersions = true;
Copy link
Member

Choose a reason for hiding this comment

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

That's the correct fix thanks. I'd just suggest to keep the previous single "if" and add this line in it.

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone May 5, 2018
@nicolas-grekas
Copy link
Member

Thank you @dmaicher.

@nicolas-grekas nicolas-grekas merged commit d3790ca into symfony:3.4 May 5, 2018
nicolas-grekas added a commit that referenced this pull request May 5, 2018
…pter (dmaicher)

This PR was squashed before being merged into the 3.4 branch (closes #27158).

Discussion
----------

[Cache] fix logic for fetching tag versions on TagAwareAdapter

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27147
| License       | MIT
| Doc PR        | -

There was a problem introduced in #27007 which breaks tag invalidation.

From what I can see there were some cases when the actual tag versions were never fetched from the tags pool and version=0 was used.

@nicolas-grekas this is my attempt of understanding the logic within `TagAwareAdapter`. Please have a look if this makes sense to you 😉

Commits
-------

d3790ca [Cache] fix logic for fetching tag versions on TagAwareAdapter
@dmaicher dmaicher deleted the fix-issue-27147 branch May 5, 2018 19:50
@andrerom
Copy link
Contributor

@nicolas-grekas Any chance getting a small 3.4 release out?
The issue this fixes broke usage in 3.4.9, second symfony version we have had to put up as conflict over the last few months (haven't had to do that for a very long time).

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.

4 participants