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.
This commit is contained in:
antirez 2013-06-24 19:27:49 +02:00
parent f0bf5fd8c7
commit 82ea1c6f5d
2 changed files with 1 additions and 4 deletions

View File

@ -1517,6 +1517,7 @@ void initServer() {
} }
if (server.cluster_enabled) clusterInit(); if (server.cluster_enabled) clusterInit();
replicationScriptCacheInit();
scriptingInit(); scriptingInit();
slowlogInit(); slowlogInit();
bioInit(); bioInit();

View File

@ -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;
} }