-
Notifications
You must be signed in to change notification settings - Fork 492
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
Limit custom LUA error stats while allowing non LUA error stats to function normally #500
base: unstable
Are you sure you want to change the base?
Conversation
(Force pushed because this was recommended by the bot here since I did not include the commit sign off originally. Also because it is not reviewed yet) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #500 +/- ##
============================================
- Coverage 69.92% 69.82% -0.10%
============================================
Files 109 109
Lines 61797 61781 -16
============================================
- Hits 43211 43140 -71
- Misses 18586 18641 +55
|
@KarthikSubbarao Overall LGTM. I do think we need to add more tests so that future changes will not introduce degradation. |
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.
lgtm. My comments are minor.
@ranshid - When functions are used and contain LUA code with server.error_reply with custom error messages, they will still be caught by this new logic when we are past the 128 limit. Did you mean add test cases where functions (with lua) are tracked under Example:
|
@KarthikSubbarao I think this is somewhat problematic. Functions are more like modules IMO and I think we should allow function errors to overflow. I think maybe we can flag the client (or check if we are in the context of eval/evalsha) in order to enforce the overflow? |
Functions are still using LUA and are using the same APIs such as To handle this, when a server exceeds the limit, when functions are used with additional custom errors, they are tracked under IMO, this behavior makes sense - but I am also curious to hear from others |
…es while allowing non LUA errors to function as usual Signed-off-by: Karthik Subbarao <karthikrs2021@gmail.com>
Signed-off-by: Karthik Subbarao <karthikrs2021@gmail.com>
Signed-off-by: Karthik Subbarao <karthikrs2021@gmail.com>
Signed-off-by: Karthik Subbarao <karthikrs2021@gmail.com>
Sorry for the force push. I did not include the sign off on the previous commit and the DCO check required this |
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Implementing the change proposed here: #487
In this PR, we prevent tracking new error messages from LUA if the number of error messages (in the errors RAX) is greater than 128. Instead, we will track any additional LUA error type in a new counter:
errorstat_LUA_ERRORSTATS_DISABLED
and if a non-LUA error (e.g. MOVED / CLUSTERDOWN) occurs, they will continue to be tracked as usual.This will address the issue of spammed error messages / memory usage of the errors RAX. Additionally, we will not have to execute
CONFIG RESETSTAT
to restore error stats functionality because normal error messages continue to be tracked.Example: