Closed
Description
What steps will reproduce the problem?
- Call
yii\mutex\PgsqlMutex::acquireLock()
passing in a non-null$timeout
value.
What is the expected result?
The lock should wait up to the number of seconds defined by $timeout
before giving up on acquiring the lock.
What do you get instead?
An InvalidArgumentException
is thrown, because PostgreSQL doesn’t support lock timeouts like MySQL and Oracle do.
I realize that this is intended behavior so not exactly a bug, but why can’t PgsqlMutex just fall back on the sleep()
function like FileMutex and yii\redis\Mutex
do?
Additional info
Q | A |
---|---|
Yii version | 2.0.15.1 |
PHP version | 7.2 |
Operating system | Ubuntu 16.04.1 |