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

Fix expired lock not cleaned#32071

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

Merged
fabpot merged 1 commit intosymfony:3.4fromjderusse:fix-expired-lock
Jun 17, 2019
Merged

Conversation

@jderusse
Copy link
Member

@jderussejderusse commentedJun 17, 2019
edited by fabpot
Loading

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#31426
LicenseMIT
Doc PRNA

When a lock is acquired BUT not as fast as expected, a LockExpiredException is thrown.
Issue is, that the lock is not removed which avoid other process to acquire that lock.

This PR clean state of store when a LockExpiredException is triggered.

note: same bug should be fixed in 4.3 in PDO and Zookeeper

}
}

$this->checkNotExpired($key);
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

this check is duplicated inStores andLock. The goal was to be sure that the check is performed even when user call the store without using ourLock facade.
But I wonder if it worth it: this leads to duplicated code and some stores forget to implement it (ie. ZooKeeper)

@fabpot
Copy link
Member

Thank you@jderusse.

@fabpotfabpot merged commit9f960f3 intosymfony:3.4Jun 17, 2019
fabpot added a commit that referenced this pull requestJun 17, 2019
This PR was merged into the 3.4 branch.Discussion----------Fix expired lock not cleaned| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#31426| License       | MIT| Doc PR        | NAWhen a lock is acquired BUT not as fast as expected, a LockExpiredException is thrown.Issue is, that the lock is not removed which avoid other process to acquire that lock.This PR clean state of store when a LockExpiredException is triggered.note: same bug should be fixed in 4.3 in PDO and ZookeeperCommits-------9f960f3 Fix expired lock not cleaned
@fabpot
Copy link
Member

@jderusse Can you create a PR on 4.3 for the new PDO and Zookeeper classes? (4.3 contains your fix now)

@nicolas-grekas
Copy link
Member

The CI on 4.2 is red after this PR I think. Maybe a bad merge. Could you please send a PR on 4.2 to fix it?
Seehttps://travis-ci.org/symfony/symfony/jobs/546872044

@nicolas-grekas
Copy link
Member

OK, fixed for 4.2, sorry for the noise.
For 4.3, I don't know how to apply the change so I'll let you do it. Thanks

nicolas-grekas added a commit that referenced this pull requestJun 17, 2019
This PR was merged into the 4.3 branch.Discussion----------[Lock] Fix expired lock not cleaned in ZooKeeper| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | yes| New feature?  | ,p| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#31426| License       | MIT| Doc PR        | NAFollowing#32071 for 4.3 branchcontext:When a lock is acquired BUT not as fast as expected, a LockExpiredException is thrown.Issue is, that the lock is not removed which avoid other process to acquire that lock.This PR clean state of store when a LockExpiredException is triggered in PDO and ZooKeepeer.Commits-------4f808ef Fix Expiring lock in PDO and ZooKeeper
This was referencedJun 26, 2019
@jderussejderusse deleted the fix-expired-lock branchAugust 2, 2019 12:15
if ($this->key->isExpired()) {
try {
$this->release();
}catch (\Exception$e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to add it as previous$e.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

hmm.. I don't think so.. Here the exception throw byrelease is not related to theLockExpiredException we want to throw..

Copy link
Contributor

@umpirskyumpirskyNov 12, 2020
edited
Loading

Choose a reason for hiding this comment

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

Imagine having this caught in production and not being able to see the error.

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

Reviewers

@fabpotfabpotfabpot approved these changes

+1 more reviewer

@umpirskyumpirskyumpirsky left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@jderusse@fabpot@nicolas-grekas@umpirsky@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp