-
Notifications
You must be signed in to change notification settings - Fork 698
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
Extract the scripting engine code from the functions unit #1312
base: unstable
Are you sure you want to change the base?
Conversation
40bcded
to
e8db485
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #1312 +/- ##
============================================
+ Coverage 70.83% 70.91% +0.07%
============================================
Files 120 121 +1
Lines 64911 65079 +168
============================================
+ Hits 45982 46152 +170
+ Misses 18929 18927 -2
|
@rjd15372 You could point the merge branch as your initial branch. It will show only the diff then. |
990447a
to
54eb99f
Compare
54eb99f
to
1ae23e8
Compare
d095057
to
375d681
Compare
This commit creates a new unit for the scripting engine code by extracting the existing code from the functions unit. We're doing this refactor to prepare the code for runnning the `EVAL` command using different scripting engines. Signed-off-by: Ricardo Dias <[email protected]>
375d681
to
125394c
Compare
…eate library callback Instead of using C strings to return the errors that may be happen during the code parsing of a scripting engine, use `robj` strings. This commit also removes the `valkey_asprintf` function, since it's not used in any place anymore. Signed-off-by: Ricardo Dias <[email protected]>
@zuiderkwast @PingXie this refactor 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.
I took a quick look. I'd suggest renaming "engine" to "scripting engine" globally first. We have been using "engine", "core engine", and "Valkey server" interchangeably in our daily conversations, documentation, and the code. We should qualify this new "engine" as "scripting engine" to avoid confusion.
Sounds good 👍 |
Signed-off-by: Ricardo Dias <[email protected]>
Signed-off-by: Ricardo Dias <[email protected]>
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.
This looks pretty good. Can you list the changes in the PR top comment, in particular the module API changes?
* renames the prefix of scripting engine functions from `engine` to `scriptingEngine` * fixes scripting_engine header file top macro name * reorders source file list in cmake Signed-off-by: Ricardo Dias <[email protected]>
Signed-off-by: Ricardo Dias <[email protected]>
Signed-off-by: Ricardo Dias <[email protected]>
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.
Overall LGTM. Will give it once-over once the active comments are resolved. Thanks @rjd15372!
* Changed return type of `engineIterCallback` to `void` * removed `exit(1)` call after `serverPanic` Signed-off-by: Ricardo Dias <[email protected]>
Signed-off-by: Ricardo Dias <[email protected]>
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.
I didn't finish reviewing but I have some pending comments since last week. Posting them now.
I think this is close to ready to merge.
* Inlines `scriptingEngineImpl` struct inside `scriptingEngine` struct * Improves log message when engine is already registered Signed-off-by: Ricardo Dias <[email protected]>
…_memory_overhead` It also fixes a bug, where we would never decrement the memory overhead of scripting engines that were unregistered. Signed-off-by: Ricardo Dias <[email protected]>
Signed-off-by: Ricardo Dias <[email protected]>
This commit creates a new compilation unit for the scripting engine code by extracting the existing code from the functions unit.
We're doing this refactor to prepare the code for running the
EVAL
command using different scripting engines.This PR also fixes #1470.
Signed-off-by: Ricardo Dias [email protected]