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

Appearance settings

Commit 5af1e9e

Browse filesBrowse files
minor #32075 [Lock] Fix expired lock not cleaned in ZooKeeper (jderusse)
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 <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes | Fixed tickets | #31426 | License | MIT | Doc PR | NA Following #32071 for 4.3 branch context: 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
2 parents 15652e3 + 4f808ef commit 5af1e9e
Copy full SHA for 5af1e9e

File tree

1 file changed

+4
-0
lines changed
Filter options

1 file changed

+4
-0
lines changed

‎src/Symfony/Component/Lock/Store/ZookeeperStore.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Store/ZookeeperStore.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
*/
2626
class ZookeeperStore implements StoreInterface
2727
{
28+
use ExpiringStoreTrait;
29+
2830
private $zookeeper;
2931

3032
public function __construct(\Zookeeper $zookeeper)
@@ -45,6 +47,8 @@ public function save(Key $key)
4547
$token = $this->getUniqueToken($key);
4648

4749
$this->createNewLock($resource, $token);
50+
51+
$this->checkNotExpired($key);
4852
}
4953

5054
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.