summaryrefslogtreecommitdiff
path: root/src/rdb.c
diff options
context:
space:
mode:
authormeir@redislabs.com <meir@redislabs.com>2021-10-05 17:03:12 +0300
committermeir <meir@redis.com>2021-12-01 23:31:08 +0200
commite0cd580aefe13e49df802fec5135e4f22d46e758 (patch)
treec6fd1708d06beafb26b3d31d29f5b17a5c133110 /src/rdb.c
parent22aab1ce94f5725f1c8d0fa3a062fd2e12957967 (diff)
downloadredis-e0cd580aefe13e49df802fec5135e4f22d46e758.tar.gz
Redis Functions - Move Lua related variable into luaCtx struct
The following variable was renamed: 1. lua_caller -> script_caller 2. lua_time_limit -> script_time_limit 3. lua_timedout -> script_timedout 4. lua_oom -> script_oom 5. lua_disable_deny_script -> script_disable_deny_script 6. in_eval -> in_script The following variables was moved to lctx under eval.c 1. lua 2. lua_client 3. lua_cur_script 4. lua_scripts 5. lua_scripts_mem 6. lua_replicate_commands 7. lua_write_dirty 8. lua_random_dirty 9. lua_multi_emitted 10. lua_repl 11. lua_kill 12. lua_time_start 13. lua_time_snapshot This commit is in a low risk of introducing any issues and it is just moving varibales around and not changing any logic.
Diffstat (limited to 'src/rdb.c')
-rw-r--r--src/rdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rdb.c b/src/rdb.c
index 4a65f2cc9..dcbc83785 100644
--- a/src/rdb.c
+++ b/src/rdb.c
@@ -1303,8 +1303,8 @@ int rdbSaveRio(rio *rdb, int *error, int rdbflags, rdbSaveInfo *rsi) {
* the script cache as well: on successful PSYNC after a restart, we need
* to be able to process any EVALSHA inside the replication backlog the
* master will send us. */
- if (rsi && dictSize(server.lua_scripts)) {
- di = dictGetIterator(server.lua_scripts);
+ if (rsi && dictSize(evalScriptsDict())) {
+ di = dictGetIterator(evalScriptsDict());
while((de = dictNext(di)) != NULL) {
robj *body = dictGetVal(de);
if (rdbSaveAuxField(rdb,"lua",3,body->ptr,sdslen(body->ptr)) == -1)
@@ -2808,7 +2808,7 @@ int rdbLoadRio(rio *rdb, int rdbflags, rdbSaveInfo *rsi, redisDb *dbarray) {
if (rsi) rsi->repl_offset = strtoll(auxval->ptr,NULL,10);
} else if (!strcasecmp(auxkey->ptr,"lua")) {
/* Load the script back in memory. */
- if (luaCreateFunction(NULL,server.lua,auxval) == NULL) {
+ if (luaCreateFunction(NULL, auxval) == NULL) {
rdbReportCorruptRDB(
"Can't load Lua script from RDB file! "
"BODY: %s", (char*)auxval->ptr);