-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Lock] Lock::acquire will always return false when using RedisStore #59387
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
Comments
Can you test if #59348 fixes this too? |
I don't see a way how I can get this fix using composer and packagist. When trying to get |
it's merged into 7.2 branch, which has not been merged into 7.3 yet. It will be available in next patch release. |
The changes have been merged up into the |
I fetched latest fix. Previously it was fine on Redis and Valkey had timeout 15 seconds and then it got error. Now the error on Valkey is immediately, redis is still working great. I tested docker images:
and only valkey had issues. So... most likely there are changes under the hood in in that engine and |
well it's a RedisStore, not a ValkeyStore 😅 perhaps it needs a dedicated store instead. |
Yeah, that might be the case ;) I hoped the fork will work |
I've made another test. Our app is using |
the PHP Redis extension has updated its description to say it is an extension providing support for the REdis Serialization Protocol (RESP for short) rather than only for Redis. As Valkey implements the RESP protocol, I would suggest you to report this to Valkey as well if their |
…owak) This PR was submitted for the 7.3 branch but it was squashed and merged into the 7.2 branch instead. Discussion ---------- [Lock] Make sure RedisStore will also support Valkey | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #59387 | License | MIT As the change happened on Valkey (https://github.com/valkey-io/valkey/pull/617/files#diff-1abc5651133d108c0c420d9411925373c711133e7748d9e4f4c97d5fb543fdd9L1819-R1819), ~it's hard to consider this a bug when `RedisStore` was meant only to support Redis ;)~ Commits ------- 15d6b5e [Lock] Make sure RedisStore will also support Valkey
…wak) This PR was squashed before being merged into the 7.2 branch. Discussion ---------- Issue 59387-2: make check with prefix more robust | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | yes | New feature? | no | Deprecations? |no | Issues | Fix #59387 | License | MIT Making the #59387 more robust and future proof. Commits ------- e1af127 Issue 59387-2: make check with prefix more robust
Symfony version(s) affected
7.2, also tested 7.3.x-dev 9169931
Description
We're using Valkey 7.2.4 (more less Redis fork) and it works perfectly fine on Sf 6.4.
On 7.2 (tested dev branches and main) we got issue with
Lock->acquire
. It uses under the hoodRedisStore->save
and the$this->evaluate
(https://github.com/symfony/symfony/blob/7.3/src/Symfony/Component/Lock/Store/RedisStore.php#L86) .The redis tab output:

How to reproduce
I believe the difference is between
eval
andevalSha
, so if you please try to create lock and acquire it using Redis.We're actually using Valkey (valkey/valkey:8 docker image, https://hub.docker.com/r/valkey/valkey/).
Possible Solution
No response
Additional Context
Might be similar to #58660
The text was updated successfully, but these errors were encountered: