Allow running WAITAOF in scripts, remove NOSCRIPT flag#12977
Allow running WAITAOF in scripts, remove NOSCRIPT flag#12977oranagra merged 3 commits intoredis:unstablefrom
Conversation
This looks like it was missing from 7.0 (redis#9656).
|
@enjoy-binbin We added an explicit test for this: Seems intentional from #11568. I remember finding it weird behavior, but it made it consistent with multi-exec. |
|
ohh. Sorry i did not bother to run a local test. In this case should we also remove noscript flag from waitaof? |
|
ok, I browsed the corresponding PR again, it seems that we need to remove NOSCRIPT from WAITAOF. |
oranagra
left a comment
There was a problem hiding this comment.
i'm ok with this change (to be symmetrical), but i wonder if we should mention it in the release notes.
it would be pointless to use this commands in scripts after the made some modifications (we know what the response would be), so the only reason to use it in a script is to check if the commands before the scripts were synced, and in some way act according to the response.
do you think this could be useful for someone?
regarding the BLOCKING flag, this flag doesn't do anything other than the fact it is exposed in COMMAND command so that clients can tell that detail about the command.
i don't recall if there's a reason for it to be missing from WAIT*, so i don't have an objection to add it.
|
@yossigo do you see any reason to mention this in the release notes? |
|
@oranagra Yes, it's a behavior change that we need to document. |
In redis#11568 we removed the NOSCRIPT flag from commands, e.g. removing NOSCRIPT flag from WAIT. Aiming to allow them in scripts and let them implicitly behave in the non-blocking way. This PR remove NOSCRIPT flag from WAITAOF just like WAIT (to be symmetrical)). And this PR also add BLOCKING flag for WAIT and WAITAOF.
In redis#11568 we removed the NOSCRIPT flag from commands, e.g. removing NOSCRIPT flag from WAIT. Aiming to allow them in scripts and let them implicitly behave in the non-blocking way. This PR remove NOSCRIPT flag from WAITAOF just like WAIT (to be symmetrical)). And this PR also add BLOCKING flag for WAIT and WAITAOF.
In #11568 we removed the NOSCRIPT flag from commands, e.g. removing
NOSCRIPT flag from WAIT. Aiming to allow them in scripts and let them
implicitly behave in the non-blocking way.
This PR remove NOSCRIPT flag from WAITAOF just like WAIT (to be symmetrical)).
And this PR also add BLOCKING flag for WAIT and WAITAOF.