-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix(job-queue-plugin): Use SCAN instead of KEYS to clean indexed sets #3743
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
fix(job-queue-plugin): Use SCAN instead of KEYS to clean indexed sets #3743
Conversation
Blocking the KEYS command is common in production environments and shared Redis instances. Using SCAN also avoids blocking Redis. Fixes: vendure-ecommerce#3742
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes were found. Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
All contributors have signed the CLA ✍️ ✅ |
|
|
I have read the CLA Document and I hereby sign the CLA |
dlhck
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.
Great catch! Thank you!
1c9b00b
into
vendure-ecommerce:master



Fixes #3742
Description
Commonly in production environments, especially when Redis is shared between multiple services or in the case of some managed solutions, there is restrictive ACL on Redis users that forbids commands deemed expensive or dangerous. One of these commands is the KEYS command, as it is a blocking command. This causes the clean-up of jobs to fail.
Using SCAN instead of KEYS resolves this issue. SCAN is rarely disabled in production, as it doesn't raise the concerns that KEYS raises (blocking of the Redis instance during execution).
Breaking changes
No breaking changes have been made.
Checklist
📌 Always:
👍 Most of the time:
Summary by CodeRabbit