Skip to content

[Lock] Fallback to eval when LOAD fails due to missing script #61161

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

Merged
merged 1 commit into from
Jul 21, 2025

Conversation

santysisi
Copy link
Contributor

@santysisi santysisi commented Jul 19, 2025

Q A
Branch? 7.2
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #59795
License MIT
  • First attempts to execute the script using evalSha.
  • If the script is missing (NOSCRIPT), tries to load it using script LOAD.
  • If script LOAD is not supported, falls back to eval.

@santysisi
Copy link
Contributor Author

santysisi commented Jul 19, 2025

Hi 👋, I think the erros in the tests isn't relevant in the context of this PR.

@nicolas-grekas
Copy link
Member

In the ext-redis code patch we have a dedicated branch for clusters, isn't that what we need, instead of doing this live feature-check?

@santysisi santysisi force-pushed the fix/redis-script-fallback branch from 5442975 to 420d996 Compare July 20, 2025 22:16
@santysisi
Copy link
Contributor Author

Hi 👋 Thanks a lot for your recommendation!
I’ve updated the branch and I’m now following that approach.
Thanks again!

@santysisi
Copy link
Contributor Author

If we want to avoid that silent error when Redis cluster support is disabled, one workaround might be to use eval when the number of connections returned is 0. That way, we can proactively catch the issue before it leads to an unexpected empty iterator.

Let me know what you think

@nicolas-grekas
Copy link
Member

Thank you @santysisi.

@nicolas-grekas nicolas-grekas merged commit 3540952 into symfony:7.2 Jul 21, 2025
8 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy