-
Notifications
You must be signed in to change notification settings - Fork 704
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
Adds support for running EVAL
with different scripting engines
#1497
base: unstable
Are you sure you want to change the base?
Conversation
8ae2eb8
to
f0c2edc
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #1497 +/- ##
============================================
+ Coverage 70.99% 71.06% +0.07%
============================================
Files 121 123 +2
Lines 65175 65334 +159
============================================
+ Hits 46269 46432 +163
+ Misses 18906 18902 -4
|
f0c2edc
to
b8e97eb
Compare
Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
b8e97eb
to
7ebf8d9
Compare
@zuiderkwast this is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a huge change.
The module API changes look good to me.
It's impossible to proof-read the logic but I guess we have pretty good test coverage. Breaking up eval.c into smaller units is good idea, just hard to review. Can you summarize which code was just moved unchanged and which code was written, so it's possible to tell what to review carefully and what not?
@zuiderkwast sure.
|
Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
… the evalScripts hashtable destructor function Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
In this PR we re-implement the
EVAL
commands (EVAL
,EVALSHA
,SCRIPT LOAD
, etc...) to use the scripting engine infrastructure introduced in 6adef8e. This allowsEVAL
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
andEVAL
commands.Module API changes include:
ValkeyModuleScriptingEngineCreateFunctionsLibraryFunc
toValkeyModuleScriptingEngineCompileCodeFunc
.enum ValkeyModuleScriptingEngineSubsystemType
to specify the scripting engine subsystem (EVAL, or FUNCTION, or both).ValkeyModuleScriptingEngineSubsystemType
.ValkeyModuleScriptingEngineResetEvalEnvFunc
.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
Follow-up of #1277