Add check min-slave-* feature when evaluating Lua scripts and Functions#10160
Add check min-slave-* feature when evaluating Lua scripts and Functions#10160oranagra merged 10 commits intoredis:unstablefrom
Conversation
|
@oranagra PTAL |
oranagra
left a comment
There was a problem hiding this comment.
The fix LGTM (@MeirShpilraien PTAL).
maybe there's a way to combine these tests with existing tests that check this mechanism?
i.e. there are already tests that set up this state, and check normal redis commands, so all we need is to add an additional check for a script.
|
@oranagra change looks good but I wonder if maybe we should not even run the script in such case unless |
|
@oranagra can this PR be merged into the latest 6.x branch? |
|
@MeirShpilraien i agree, we should have both checks, one when we know the write flag in advance, and one when we don't. @anhldbk @noradomi we're currently in the process of releasing 7.0 RC1 and are busy with other things (which is why i didn't review it for a while). |
|
@oranagra
|
|
@noradomi i added a TODO at the top, let me know if you're up to it, if not, we can open a separate issue. |
|
@oranagra Sorry for the late reply, about the TODO, I haven't done it yet. So I think you can open another issue for it and I will try to contribute when I clearly understand the context about it. (ex: functions, |
|
@noradomi LGTM. |
|
@oranagra LGTY? |
oranagra
left a comment
There was a problem hiding this comment.
fix and tests LGTM.
as i noted (in the todo i added to the top), there's more to do in order to make this complete.
i'll look into it after 7.0 RC1 is released.
…ve-to-write-check
|
@MeirShpilraien please review my last commit. anyone wanna make a PR for redis 6.2 branch? |
MeirShpilraien
left a comment
There was a problem hiding this comment.
Looks good (small comment, not a blocker).
Co-authored-by: Meir Shpilraien (Spielrein) <[email protected]>
|
@noradomi pls make another PR for branch 6.2 |
|
Thank you @oranagra @MeirShpilraien. You make my day. |
yes, I will. Thanks @oranagra @MeirShpilraien for your time. |
What problem does this PR solve?
Reference this issue:: #9993
Currently, there is no check min-slave-* config when evaluating Lua script.
Before the fix:
After the fix:
Check List
Tests
integration-4.tcl.Code changes
Add check enough good slaves for write command when evaluating scripts.
This check is made before the script is executed, if we have function flags, and per redis command if we don't.
To Do