-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(script): support script flags of Eval script and Function (#2446)
This PR is designed to support three script flags within Eval Script and Function: `no-writes`, `no-cluster`, and `allow-cross-slot-keys`. Before executing the Lua script, `SaveOnRegistry` stores the parsed flags in `REGISTRY_SCRIPT_RUN_CTX_NAME`. During the execution of the Lua script, `GetFromRegistry` retrieves the flags of the currently executing script. After the script execution ends, it should be set to `nil`. For APIs like `EVAL`, `SCRIPT LOAD`, and `FUNCTION LOAD`, the flags parsed from the Eval Script will be stored in Lua's global variable `f_<sha>_flags_`. The flags parsed by FUNCTION `register_function()` will be stored in the Lua global variable `_registered_flags_<funcname>`.
- Loading branch information
1 parent
89b6a11
commit a86d317
Showing
7 changed files
with
867 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.