bug #38453 [lock] Mark Key unserializable whith PgsqlStore (jderusse)
This PR was merged into the 5.x branch.
Discussion
----------
[lock] Mark Key unserializable whith PgsqlStore
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | /
| License | MIT
| Doc PR | /
Marks key unserializable #38395 with the new PgsqlStore #38346
Commits
-------
eb934e9015
Mark Key unserializable whith PgsqlStore
This commit is contained in:
commit
414a5abe78
@ -87,6 +87,7 @@ class PostgreSqlStore implements BlockingSharedLockStoreInterface, BlockingStore
|
|||||||
|
|
||||||
// Check if lock is acquired
|
// Check if lock is acquired
|
||||||
if (true === (\is_object($result) ? $result->fetchOne() : $stmt->fetchColumn())) {
|
if (true === (\is_object($result) ? $result->fetchOne() : $stmt->fetchColumn())) {
|
||||||
|
$key->markUnserializable();
|
||||||
// release sharedLock in case of promotion
|
// release sharedLock in case of promotion
|
||||||
$this->unlockShared($key);
|
$this->unlockShared($key);
|
||||||
|
|
||||||
@ -109,6 +110,7 @@ class PostgreSqlStore implements BlockingSharedLockStoreInterface, BlockingStore
|
|||||||
|
|
||||||
// Check if lock is acquired
|
// Check if lock is acquired
|
||||||
if (true === (\is_object($result) ? $result->fetchOne() : $stmt->fetchColumn())) {
|
if (true === (\is_object($result) ? $result->fetchOne() : $stmt->fetchColumn())) {
|
||||||
|
$key->markUnserializable();
|
||||||
// release lock in case of demotion
|
// release lock in case of demotion
|
||||||
$this->unlock($key);
|
$this->unlock($key);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user