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] memcache connect should not add duplicate entries on sequential calls #27318

Merged
merged 1 commit into from Jun 4, 2018

Conversation

Projects
None yet
4 participants
@palex-fpt

palex-fpt commented May 20, 2018

Q A
Branch? 3.4 (be careful when merging)
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets #27299
License MIT

MemcachedCache::createConnection adds server to list of servers on every call. But resets this list only when it is not empty and does not match configured list.
This leads to follow: after first call list contains correct entry. After second it has server entry twice. After third it clears list and set it with correct value.

With combination of libmemcached bug (segfault on adding server after reset nonempty list) it makes impossible to use MemcachedCache::createConnection to create persistent connections.

@nicolas-grekas nicolas-grekas changed the title from bug #27299 [Cache] memcache connect should not add duplicate entries … to [Cache] memcache connect should not add duplicate entries on sequential calls May 20, 2018

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone May 21, 2018

@palex-fpt palex-fpt closed this May 29, 2018

@nicolas-grekas

This comment has been minimized.

Member

nicolas-grekas commented May 29, 2018

@palex-fpt why did you close ?

@palex-fpt

This comment has been minimized.

palex-fpt commented May 29, 2018

oops. I did not notice it was added to 3.4 milestone. I thought it should be based on 3.4 branch and resubmit it.

@palex-fpt palex-fpt reopened this May 29, 2018

@chalasr

This comment has been minimized.

Member

chalasr commented May 29, 2018

@palex-fpt no need for a new PR, we can switch the target branch while merging, but you can also do it on your side https://blog.github.com/2016-08-15-change-the-base-branch-of-a-pull-request/ (and rebase).

@palex-fpt palex-fpt changed the base branch from 3.3 to 3.4 May 29, 2018

@palex-fpt palex-fpt changed the base branch from 3.4 to 3.3 May 29, 2018

@nicolas-grekas nicolas-grekas changed the base branch from 3.3 to 3.4 Jun 4, 2018

@nicolas-grekas

This comment has been minimized.

Member

nicolas-grekas commented Jun 4, 2018

Thank you @palex-fpt.

@nicolas-grekas nicolas-grekas merged commit af06990 into symfony:3.4 Jun 4, 2018

1 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
fabbot.io Your code looks good.
Details

nicolas-grekas added a commit that referenced this pull request Jun 4, 2018

bug #27318 [Cache] memcache connect should not add duplicate entries …
…on sequential calls (Aleksey Prilipko)

This PR was submitted for the 3.3 branch but it was merged into the 3.4 branch instead (closes #27318).

Discussion
----------

[Cache] memcache connect should not add duplicate entries on sequential calls

| Q             | A
| ------------- | ---
| Branch?       | 3.4 (be careful when merging)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | #27299
| License       | MIT

MemcachedCache::createConnection adds server to list of servers on every call. But resets this list only when it is not empty and does not match configured list.
This leads to follow: after first call list contains correct entry. After second it has server entry twice. After third it clears list and set it with correct value.

With combination of libmemcached bug (segfault on adding server after reset nonempty list) it makes impossible to use MemcachedCache::createConnection to create persistent connections.

Commits
-------

af06990 bug #27299 [Cache] memcache connect should not add duplicate entries on sequential calls

@palex-fpt palex-fpt deleted the palex-fpt:BZR-27299 branch Jun 6, 2018

This was referenced Jun 25, 2018

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