-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for running
EVAL
with different scripting engines (#1497)
In this PR we re-implement the `EVAL` commands (`EVAL`, `EVALSHA`, `SCRIPT LOAD`, etc...) to use the scripting engine infrastructure introduced in 6adef8e. This allows `EVAL` to run scripts using different scripting engines. The Lua scripting engine implementation code was moved into its own subdirectory `src/lua`. This new implementation generalizes the module API for implementing scripting engines to work with both `FUNCTION` and `EVAL` commands. Module API changes include: * Rename of callback `ValkeyModuleScriptingEngineCreateFunctionsLibraryFunc` to `ValkeyModuleScriptingEngineCompileCodeFunc`. * Addition of a new enum `enum ValkeyModuleScriptingEngineSubsystemType` to specify the scripting engine subsystem (EVAL, or FUNCTION, or both). * In most callbacks was added a new parameter with the type `ValkeyModuleScriptingEngineSubsystemType`. * New callback specific for EVAL `ValkeyModuleScriptingEngineResetEvalEnvFunc`. * New API function `ValkeyModuleScriptingEngineExecutionState (*ValkeyModule_GetFunctionExecutionState)(ValkeyModuleScriptingEngineServerRuntimeCtx *server_ctx)` that is used by scripting engines to query the server about the execution state of the script that is running. Fixes #1261 Fixes #1468 Follow-up of #1277 --------- Signed-off-by: Ricardo Dias <ricardo.dias@percona.com> Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech> Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech> Co-authored-by: Ping Xie <pingxie@outlook.com>
- Loading branch information
1 parent
83abb13
commit b58088e
Showing
26 changed files
with
2,405 additions
and
1,836 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.