Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Cache] Fix invalidating tags on Redis <5#43158
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedSep 24, 2021
<5 instead of <3? What about doDeleteYieldTags()? |
7539aea to64784d2Comparewouterj commentedSep 24, 2021
This new replication method is only required when the commands are non deterministic. It seems like the I've also updated the PR to handle any exception better. Currently, users get a PHP Error: "Cannot use object of type RedisException as array". After this PR, they'll get the actual redis exception. |
64784d2 to61e00cdCompare61e00cd todbe0cf7Comparenicolas-grekas commentedSep 24, 2021
For my understanding, when did you encounter |
wouterj commentedSep 24, 2021
We had this occur when invalidating caches in production. I'm not sure what would be the best way forward. If there is an error, nothing is invalidated. So simply logging the exception and retuning would probably not be correct either. |
nicolas-grekas commentedSep 24, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Do you know what the |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
wouterj commentedSep 25, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Yeah, it was about the error in the lua script that is fixed in this PR:
So in theory, you will not get this exception. But I don't know anything about Redis, so I guess maybe there is something else in this script that breaks for e.g. Redis 4 or Redis 6 in the future? |
nicolas-grekas commentedSep 25, 2021
Can we call |
jderusse commentedSep 25, 2021
method more infohttps://redis.io/commands/eval#replicating-commands-instead-of-scripts andhttps://redis.io/commands/EVAL#scripts-with-deterministic-writes |
dbe0cf7 toeb09827Comparewouterj commentedSep 25, 2021
Oh, didn't know about this helper method. I've updated the PR with your suggestions: any exception is now logged and not thrown, and |
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
(once psalm failure is fixed)
eb09827 tofda7e7eComparefabpot commentedSep 26, 2021
Thank you@wouterj. |
https://redis.io/commands/eval#replicating-commands-instead-of-scripts