-
Notifications
You must be signed in to change notification settings - Fork 734
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
Add DENYOOM flag to SCRIPT LOAD and make it fail on OOM #866
base: unstable
Are you sure you want to change the base?
Conversation
Currently we can load a lot of lua to bypass maxmemory, adds a DENYOOM flag to make it fail on OOM. Signed-off-by: Binbin <binloveplay1314@qq.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #866 +/- ##
============================================
- Coverage 70.47% 70.24% -0.24%
============================================
Files 112 112
Lines 61467 61467
============================================
- Hits 43320 43177 -143
- Misses 18147 18290 +143
|
This makes sense to me @soloestoy Do you know of any use case where this would cause an issue. Multi-exec with script load should fail. I guess it's a breaking change so we need a major change probably. |
I suppose I realized one case this might fail. If someone is trying to load a script that cleans up data, it might fail unnecessarily. There are also previous cases where multi-execs would succeed but should now fail. |
I think this would be hard for users to understand. Currently, when the This also reminds me of a feature I worked on before redis/redis#5454, where in order to prevent clients from caching too many commands in a MULTI context, causing uncontrolled memory growth, we marked transactions as dirty when we exceeded Maybe we can take a different approach by adding |
I guess I want to ask how much of a real problem this is? AFAIK we at AWS have never seen this manifest at a problem, but maybe others have? |
I have seen many instances where |
yeah, i have seem this too (both from eval scripts, haven't seen script load yet), that why now we have a eval script eviction. btw, we now have these following issue:
|
We have also seen this, but this is almost always from
I think the concern in the past was that many clients, on new connection establishment will send |
sound good to me, what kind of config are we talking about here? maxmemory-scripts to limit the scripts memory (including server part and the lua VM part)? |
Currently we can load a lot of lua to bypass maxmemory,
adds a DENYOOM flag to make it fail on OOM.