-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Cache] Redis clear cursor error with Valkey #58660
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
This PR was submitted for the 7.1 branch but it was merged into the 5.4 branch instead. Discussion ---------- [Cache] Initialize RedisAdapter cursor to 0 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #58660 | License | MIT See #58660 for details and reproducer. Commits ------- 99a7160 initialize RedisAdapter cursor to 0
Looks like the fix didn't work. |
Just for context, this behavior is reproducible not only with Valkey, but also with Redis 7.4. It works with older Redis versions though. |
This might be an issue with the extension then. Did you try using Predis instead of ext-redis to see if there's a difference? |
I have only tested it with Predis actually. Using Predis, the suggested |
Can you try with the extension then? Maybe a bug to fill for Predis? |
Yeah, I guess that's a possibility. I tried If it's a change in redis API, I guess I would expect Predis to handle it, but I don't know what would be their opinion. I'll open an issue there and link it here. Then let's continue from there. @thomas-hiron did you experience this while using Predis, or the redis extension? |
Hi, I'm using Predis indeed! I also confirm I don't have the issue with SncBundle being configured with the PHP Redis extension. Thanks for your investigation! |
I reported the issue to predis predis/predis#1488 |
Thanks. |
This PR was merged into the 5.4 branch. Discussion ---------- [Cache] Fix clear() when using Predis | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #58660 | License | MIT Commits ------- fc796de [Cache] Fix clear() when using Predis
Symfony version(s) affected
7.1.2
Description
I'm trying to flush doctrine metadata using Redis adapter with Valkey 8.0.
The RedisTrait sends the following query to Valkey:
SCAN NULL
on the first loop iteration, which leads to errorERR invalid cursor
.Shouldn't the cursor variable initialized to value 0?
I've patched the file with
$cursor = 0;
instead, andbin/console doctrine:cache:clear-metadata
works as expected.How to reproduce
I'm using the following configuration:
And run
bin/console doctrine:cache:clear-metadata
to get the error.You can also use directly
valkey-cli SCAN NULL
Possible Solution
Initialize the cursor variable with 0.
Additional Context
No response
The text was updated successfully, but these errors were encountered: