Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #54252 [Lock] compatiblity with redis cluster 7 (bastnic)
This PR was merged into the 5.4 branch. Discussion ---------- [Lock] compatiblity with redis cluster 7 | Q | A | | ------------- | --- | | Branch? | 5.4 | | Bug fix? | yes | | New feature? | no | | Deprecations? | no | | License | MIT | While upgrading from redis 5 (no cluster) to AWS Elasticache redis 7 (cluster serverless), I stumble upon a fail. ``` This Redis command is not allowed from script script ``` Investigating, the fail is here, `TIME` is not available in cluster mode. https://github.com/symfony/symfony/blob/d508d5f3a91b446452ee92a3e04fd66b44afe88a/src/Symfony/Component/Lock/Store/RedisStore.php#L272-L281 ``` redis > EVAL 'local now = redis.call("TIME"); redis.call("SET", KEYS[1], "1", "PX", 1); return 1;' 1 pouet (error) ERR This Redis command is not allowed from script script: b0e701c57bb0187cbd6ec8e404a7f6ba19b11a94, on `@user_script`:1. ``` BUT the error does not contains `commands not allowed after non deterministic` anymore, so no fallback on the PHP implementation. Hence, the new exception catch. See https://redis.io/docs/interact/programmability/eval-intro/#replicating-commands-instead-of-scripts Commits ------- ee5bd73 [Lock] compatiblity with redis cluster 7
- Loading branch information