Let script continue if busy-reply-threshold is zero#3307
Conversation
Signed-off-by: Alon Arenberg <alonare@amazon.com>
cfe7e9f to
5930096
Compare
There was a problem hiding this comment.
LGTM!
here is where we set hook before
if (server.busy_reply_threshold > 0 && !debug_enabled) {
lua_sethook(lua, luaMaskCountHook, LUA_MASKCOUNT, 100000);
delhook = 1;
}
enjoy-binbin
left a comment
There was a problem hiding this comment.
So it was introduced in #2858.
Signed-off-by: Binbin <binloveplay1314@qq.com>
|
FYI, i update the condition to |
enjoy-binbin
left a comment
There was a problem hiding this comment.
Wait. Please double check the old luaCallFunction and scriptInterrupt. I lost some details here.
|
I think the proposed code change is not correct. Pushing the original commit |
…s set to 0 Signed-off-by: Alon Arenberg <alonare@amazon.com>
|
i was thinking something like this, can we add this fast path before the elapsedMs? |
|
Ran mentions the config is minimum at 0, and the valkey.conf is saying it can be negative, we need to fix the conf as well. |
…alkey.conf Signed-off-by: Alon Arenberg <alonare@amazon.com>
Signed-off-by: Alon Arenberg <alonare@amazon.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #3307 +/- ##
=============================================
+ Coverage 0 74.89% +74.89%
=============================================
Files 0 129 +129
Lines 0 71549 +71549
=============================================
+ Hits 0 53588 +53588
- Misses 0 17961 +17961
🚀 New features to boost your workflow:
|
Before we added LUA as a module we had a logic to NOT register the luaHook when the value of `busy-reply-threshold` config is set to 0. Now we ALWAYS register the hook and in order to keep aligned with old behavior we will let the execution of the script continue from the interrupt hook when `busy-reply-threshold` config is set == 0. And in value.conf, we are saying the config can be negative, but in fact the config is minimum at 0, fix the valkey.conf as well. ``` # The default is 5 seconds. It is possible to set it to 0 or a negative value # to disable this mechanism (uninterrupted execution) ``` It was introduced in valkey-io#2858. Signed-off-by: Alon Arenberg <alonare@amazon.com> Signed-off-by: Binbin <binloveplay1314@qq.com> Co-authored-by: Binbin <binloveplay1314@qq.com>
Before we added LUA as a module we had a logic to NOT register the luaHook when the value of `busy-reply-threshold` config is set to 0. Now we ALWAYS register the hook and in order to keep aligned with old behavior we will let the execution of the script continue from the interrupt hook when `busy-reply-threshold` config is set == 0. And in value.conf, we are saying the config can be negative, but in fact the config is minimum at 0, fix the valkey.conf as well. ``` # The default is 5 seconds. It is possible to set it to 0 or a negative value # to disable this mechanism (uninterrupted execution) ``` It was introduced in valkey-io#2858. Signed-off-by: Alon Arenberg <alonare@amazon.com> Signed-off-by: Binbin <binloveplay1314@qq.com> Co-authored-by: Binbin <binloveplay1314@qq.com> Signed-off-by: Harkrishn Patro <bunty.hari@gmail.com>
Before we added LUA as a module we had a logic to NOT register the luaHook when the value of `busy-reply-threshold` config is set to 0. Now we ALWAYS register the hook and in order to keep aligned with old behavior we will let the execution of the script continue from the interrupt hook when `busy-reply-threshold` config is set == 0. And in value.conf, we are saying the config can be negative, but in fact the config is minimum at 0, fix the valkey.conf as well. ``` # The default is 5 seconds. It is possible to set it to 0 or a negative value # to disable this mechanism (uninterrupted execution) ``` It was introduced in valkey-io#2858. Signed-off-by: Alon Arenberg <alonare@amazon.com> Signed-off-by: Binbin <binloveplay1314@qq.com> Co-authored-by: Binbin <binloveplay1314@qq.com>
Before we added LUA as a module we had a logic to NOT register the
luaHook when the value of
busy-reply-thresholdconfig is set to 0.Now we ALWAYS register the hook and in order to keep aligned with
old behavior we will let the execution of the script continue from
the interrupt hook when
busy-reply-thresholdconfig is set == 0.And in value.conf, we are saying the config can be negative, but in
fact the config is minimum at 0, fix the valkey.conf as well.
It was introduced in #2858.