diff options
author | meir@redislabs.com <meir@redislabs.com> | 2021-10-05 17:03:12 +0300 |
---|---|---|
committer | meir <meir@redis.com> | 2021-12-01 23:31:08 +0200 |
commit | e0cd580aefe13e49df802fec5135e4f22d46e758 (patch) | |
tree | c6fd1708d06beafb26b3d31d29f5b17a5c133110 /src/object.c | |
parent | 22aab1ce94f5725f1c8d0fa3a062fd2e12957967 (diff) | |
download | redis-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/object.c')
-rw-r--r-- | src/object.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/object.c b/src/object.c index 5831f196d..dab0648a8 100644 --- a/src/object.c +++ b/src/object.c @@ -1203,9 +1203,7 @@ struct redisMemOverhead *getMemoryOverheadData(void) { mh->aof_buffer = mem; mem_total+=mem; - mem = server.lua_scripts_mem; - mem += dictSize(server.lua_scripts) * sizeof(dictEntry) + - dictSlots(server.lua_scripts) * sizeof(dictEntry*); + mem = evalScriptsMemory(); mem += dictSize(server.repl_scriptcache_dict) * sizeof(dictEntry) + dictSlots(server.repl_scriptcache_dict) * sizeof(dictEntry*); if (listLength(server.repl_scriptcache_fifo) > 0) { @@ -1325,7 +1323,7 @@ sds getMemoryDoctorReport(void) { } /* Too many scripts are cached? */ - if (dictSize(server.lua_scripts) > 1000) { + if (dictSize(evalScriptsDict()) > 1000) { many_scripts = 1; num_reports++; } |