Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Lock] prune PdoStorage table on each save according to gcProbability#31804

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
pableu wants to merge2 commits intosymfony:masterfrompableu:master

Conversation

@pableu
Copy link
Contributor

QA
Branch?4.2
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
LicenseMIT

I expected the\Symfony\Component\Lock\Store\PdoStore::prune method to be called according togcProbability every time I interact with a lock. But\Symfony\Component\Lock\Store\PdoStore::save returns early on success. As I see it, this means that expired locks are pruned much less often than specified bygcProbability.

This PR fixes that by calling prune before the early return.

I'm not so sure if checking the probabilityinside theprune method is a good solution. Maybe it would be nicer to have a separate function (randomPrune).

@nicolas-grekasnicolas-grekas changed the base branch frommaster to4.2June 3, 2019 19:06
@nicolas-grekasnicolas-grekas changed the base branch from4.2 tomasterJune 3, 2019 19:06
@nicolas-grekasnicolas-grekas added this to the4.2 milestoneJun 3, 2019
@nicolas-grekas
Copy link
Member

What about moving the "if" in a "finally" block? (an not put it inside the method I agree)
please rebase+retarget for 4.2 also.

@nicolas-grekas
Copy link
Member

Closing in favor of#32076, thank you!

@pableu
Copy link
ContributorAuthor

Okay perfect. Sorry I haven't had time to work on this, but#32076 looks great.

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

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

4.2

Development

Successfully merging this pull request may close these issues.

3 participants

@pableu@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp