Skip to content

[Lock] CombinedStore do not handle store exceptions on exists call #39470

@dzubchik

Description

@dzubchik

Symfony version(s) affected: 5.2.0

Description
CombinedStore do not handle store exceptions on exists method call.

How to reproduce

$lockFactory = new \Symfony\Component\Lock\LockFactory(
    new \Symfony\Component\Lock\Store\CombinedStore([
        new \Symfony\Component\Lock\Store\RedisStore(
            new \Predis\Client(['host' => 'unexisting-or-unreachable-localhost'])
        ),
        new \Symfony\Component\Lock\Store\InMemoryStore(),
        new \Symfony\Component\Lock\Store\FlockStore(),
    ],
        new \Symfony\Component\Lock\Strategy\ConsensusStrategy()
    ));


$key = uniqid(true);

$lock = $lockFactory->createLock($key, 30, false);
$lock->acquire();

$lock->release();

Possible Solution

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions