-
Notifications
You must be signed in to change notification settings - Fork 949
Description
Describe the bug
We have PHP application using symfony/lock. Version 6.4 works fine, as it's using eval
. Version 7.2 and beyond use evalSha
under the hood.
It works fine for Redis 6.2, 7.2 and so on. It didn't work well for Valkey 8 (7.2.4 redis version).
Lock::acquire
attempt for Redis returns true
, for Valkey false
.
In the previous version (using eval
) it works fine.
Is there any significant difference between evalSha
of Valkey and Redis?
Reference: symfony/symfony#59387
To reproduce
I've made a repository that allows you to reproduce it: https://github.com/PatNowak/symfony-valkey-poc.
Long story short:
git clone git@github.com:PatNowak/symfony-valkey-poc.git
cd symfony-valkey-poc
./app.sh valkey
It will by default use symfony/lock
in the version 7.2
that use evalSha
under the hood.
To downgrade the version please do:
./app.sh 6.4
./app.sh down
./app.sh valkey
You can also check it works fine (before downgrading) on the Redis:
./app.sh down
./app.sh redis
I left the comments in the repository README.md file.
Expected behavior
The evalSha
will work the same as in the Redis.
Additional information
I referenced the issue in the Symfony, as first I suspected something on their side. I also tested both PHP redis connectors - phpredis
and predis
. No difference.