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

[Lock] Support for MongoDB Store #27345

Open
kralos opened this Issue May 23, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@kralos

kralos commented May 23, 2018

Description
We should support Semaphore Locks with a MongoDB back end to allow those that already use MongoDB as a distributed storage engine.

Symfony already partially supports MongoDB for session storage: Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler

Example

$client = new MongoDb\Client();

$store = new Symfony\Component\Lock\Store\MongoDbStore(
    $client
    array(
        database: '%mongo_database%'
        collection: lock
    )
);
$lockFactory = new Symfony\Component\Lock\Factory($store);
$lock = $lockFactory->createLock('my-resource');

kralos pushed a commit to kralos/symfony that referenced this issue May 23, 2018

@fabpot

This comment has been minimized.

Member

fabpot commented May 23, 2018

As this would be a new feature, it would go into 4.2, so it would not support the legacy drivers.

kralos pushed a commit to kralos/symfony that referenced this issue May 23, 2018

@kralos

This comment has been minimized.

kralos commented May 23, 2018

I've rebuilt the branch off master and stripped out the legacy support.

kralos pushed a commit to kralos/symfony that referenced this issue May 23, 2018

kralos pushed a commit to kralos/symfony that referenced this issue May 23, 2018

kralos pushed a commit to kralos/symfony that referenced this issue May 23, 2018

Joe Bennett
symfony#27345 Removed dev requirement for mongodb/mongodb
travis env has ext-mongodb but appveyor doesn't

since MongoDbSessionHandler does the same i've stripped the dev requirement for mongodb/mongodb

kralos pushed a commit to kralos/symfony that referenced this issue May 24, 2018

kralos added a commit to kralos/symfony that referenced this issue May 31, 2018

kralos added a commit to kralos/symfony that referenced this issue May 31, 2018

kralos added a commit to kralos/symfony that referenced this issue May 31, 2018

kralos added a commit to kralos/symfony that referenced this issue May 31, 2018

kralos added a commit to kralos/symfony that referenced this issue May 31, 2018

kralos added a commit to kralos/symfony that referenced this issue May 31, 2018

kralos added a commit to kralos/symfony that referenced this issue Jun 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Jun 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Jun 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Jun 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Jun 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Jun 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Jun 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Jun 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Jun 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Jun 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Jun 6, 2018

kralos added a commit to kralos/symfony that referenced this issue Jun 6, 2018

kralos added a commit to kralos/symfony that referenced this issue Jun 6, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 5, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 8, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 8, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

symfony#27345 Added automatic TTL Index enforcement / expired lock cl…
…eanup on save based on a probability option

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

symfony#27345 Added automatic TTL Index enforcement / expired lock cl…
…eanup on save based on a probability option

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 15, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 18, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 18, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 18, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 18, 2018

kralos added a commit to kralos/symfony that referenced this issue Oct 18, 2018

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