Commit 8450d6e2 authored by antirez's avatar antirez
Browse files

Move Replication Script Cache initialization in safer place.

It should be called just one time at startup and not every time the Lua
scripting engine is re-initialized, otherwise memory is leaked.
parent 545fe0c3
...@@ -1476,6 +1476,7 @@ void initServer() { ...@@ -1476,6 +1476,7 @@ void initServer() {
server.maxmemory_policy = REDIS_MAXMEMORY_NO_EVICTION; server.maxmemory_policy = REDIS_MAXMEMORY_NO_EVICTION;
} }
replicationScriptCacheInit();
scriptingInit(); scriptingInit();
slowlogInit(); slowlogInit();
bioInit(); bioInit();
......
...@@ -655,10 +655,6 @@ void scriptingInit(void) { ...@@ -655,10 +655,6 @@ void scriptingInit(void) {
* to global variables. */ * to global variables. */
scriptingEnableGlobalsProtection(lua); scriptingEnableGlobalsProtection(lua);
/* Initialize the Replication Script Cache for EVALSHA propagation to
* slaves and AOF. */
replicationScriptCacheInit();
server.lua = lua; server.lua = lua;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment