Closed
Description
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
BC Break report? | no |
RFC? | no |
Symfony version | 4.1 |
The lock component supports local stores : Semaphore and Flock.
For locking over distributed servers, remote stores require Memcached or Redis.
MySQL/MariaDB and PostgreSQL are database server typically used by Symfony applications. These DB engines support locking:
- MySQL
GET_LOCK
https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_get-lock - MariaDB
GET_LOCK
https://mariadb.com/kb/en/library/get_lock/ - PostgreSQL
pg_advisory_lock_shared
https://www.postgresql.org/docs/9.1/static/functions-admin.html
This locking mencanism is used for session in PdoSessionHandler