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
Detect possible async calls in scripts #1122
Conversation
@romange PTAL at my idea and maybe you spot some bugs or missing cases I just found one: a multi-line expression can be divided by multiple comment-only lines that we need to exclude. Multiline comments are also not supported yet |
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
I thought maybe we can just detect all comments ahead and remove them - it makes things much easier, however it wouldn't preserve the line numbers for error reporting. Instead of removing then we could replace then with some placeholder, but it doesn't make much sense as the regex still needs to account for them, just in a simper way |
The question is whether the frameworks we care about use these hard cases or not. |
Another thing I just thought is that it's hard to explain "acall" semantics to users because "asynchronicity" is the implementation detail in Dragonfly. What we really want to say, IMHO, is that a call that explicitly does not return any results is more efficient in Dragonfly. In that case, should we call it "proc" and not "acall" ? |
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Yes, we can call it proc and ppoc(?). I can do a renaming PR afterwards, but lets keep it out of scope here |
What's a ppoc?
…On Sun, Apr 23, 2023, 15:19 Vladislav ***@***.***> wrote:
In that case, should we call it "proc" and not "acall" ?
Yes, we can call it proc and ppoc(?). I can do a renaming PR afterwards,
but lets keep it out of scope here
—
Reply to this email directly, view it on GitHub
<#1122 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4BFCB736E566HXR33MBFTXCUM6NANCNFSM6AAAAAAXH5UKXQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
*pproc - pcall but without reply |
Maybe we should enable it only with a flag or atomic modes? See #1091 |
The main use-case is for atomic scripts.
Yes, setting the flag is a good idea, but I think it should be enabled by
default.
…On Sun, Apr 23, 2023 at 7:17 PM Vladislav ***@***.***> wrote:
Maybe we should enable it only with a flag? See #1091
<#1091>
—
Reply to this email directly, view it on GitHub
<#1122 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4BFCCRNTIKJG3ZKLZSZRLXCVI2DANCNFSM6AAAAAAXH5UKXQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Regex for detecting possible async calls for scripts