-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Add Lock's PdoStore documentation #9875
Conversation
components/lock.rst
Outdated
@@ -195,7 +196,7 @@ PHP process is terminated:: | |||
|
|||
Beware that some file systems (such as some types of NFS) do not support | |||
locking. In those cases, it's better to use a directory on a local disk | |||
drive or a remote store based on Redis or Memcached. | |||
drive or a remote store based on Pdo, Redis or Memcached. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pdo-> PDO
components/lock.rst
Outdated
.. caution:: | ||
|
||
In a cluster configured with multiple master, ensure writes are | ||
synchronously propaged to every nodes, or always use the same node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
propagated?
components/lock.rst
Outdated
|
||
In order to purge old lock, this store use a current datetime to define a | ||
expiration date reference. This mechanism relies on all client and server nodes | ||
to have synchronized clock. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read the code PR, is a synchronized clock still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! indeed a previous version uses the client's clock. But it has been replaced by SGDB's time.
I removed the client
from the sentence, as this is still the case for multi-master nodes
components/lock.rst
Outdated
|
||
use Symfony\Component\Lock\Store\PdoStore; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra blank line
components/lock.rst
Outdated
PdoStore | ||
~~~~~~~~~~ | ||
|
||
The PdoStore rely on the `ACID`_ properties of the SQL engine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relies
components/lock.rst
Outdated
|
||
.. caution:: | ||
|
||
In a cluster configured with multiple master, ensure writes are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple masters
components/lock.rst
Outdated
|
||
.. caution:: | ||
|
||
Some SQL engine like MySQL allows to disable unique constraint check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SQL engines ... allow ... disable the unique ...
components/lock.rst
Outdated
Some SQL engine like MySQL allows to disable unique constraint check. | ||
Ensure that this is not the case ``SET unique_checks=1;``. | ||
|
||
In order to purge old lock, this store use a current datetime to define a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old locks, this store uses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an expiration
components/lock.rst
Outdated
|
||
In order to purge old lock, this store use a current datetime to define a | ||
expiration date reference. This mechanism relies on all server nodes to | ||
have synchronized clock. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clocks
components/lock.rst
Outdated
|
||
.. caution:: | ||
|
||
To ensure locks don't expire prematurely; the ttl's should be set with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TTLs
components/lock.rst
Outdated
``Lock``, therefore this key must not be shared between processes (session, | ||
Remote stores (:ref:`MemcachedStore <lock-store-memcached>`, | ||
:ref:`PdoStore <lock-store-pdo>` and :ref:`RedisStore <lock-store-redis>`) use | ||
an unique token to recognize the true owner of the lock. This token is stored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a unique
This PR was merged into the 4.2-dev branch. Discussion ---------- [LOCK] Add a PdoStore | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #25400 | License | MIT | Doc PR | symfony/symfony-docs#9875 This is an alternative to #25578 Commits ------- 46fe1b0712 Add a PdoStore in lock
This PR was merged into the 4.2-dev branch. Discussion ---------- [LOCK] Add a PdoStore | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #25400 | License | MIT | Doc PR | symfony/symfony-docs#9875 This is an alternative to #25578 Commits ------- 46fe1b0 Add a PdoStore in lock
components/lock.rst
Outdated
|
||
.. caution:: | ||
|
||
In a cluster configured with multiple masters, ensure writes are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it correct to use the word master
(in the context master/slave database)?
ping @lsmith77 or @javiereguiluz
cf: redis/redis#3185
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
master/slave is a bad terminology (see https://twitter.com/dhh/status/1032268675674296320)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that's exactly my question, replaced by primaries
Thanks for contributing these docs Jérémy! They are merged now in time to prepare for Symfony 4.2 update. Thanks! |
Documenting symfony/symfony#27456