mirror of
https://github.com/fluencelabs/redis
synced 2025-04-01 23:31:03 +00:00
call lua_gc() for incremental garbage collection. Likely there is to tune this at some point.
This commit is contained in:
parent
c2a7dd85ae
commit
40531be0e3
@ -380,8 +380,10 @@ void evalCommand(redisClient *c) {
|
|||||||
addReplyErrorFormat(c,"Error running script (call to %s): %s\n",
|
addReplyErrorFormat(c,"Error running script (call to %s): %s\n",
|
||||||
funcname, lua_tostring(lua,-1));
|
funcname, lua_tostring(lua,-1));
|
||||||
lua_pop(lua,1);
|
lua_pop(lua,1);
|
||||||
|
lua_gc(lua,LUA_GCCOLLECT,0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
selectDb(c,server.lua_client->db->id); /* set DB ID from Lua client */
|
selectDb(c,server.lua_client->db->id); /* set DB ID from Lua client */
|
||||||
luaReplyToRedisReply(c,lua);
|
luaReplyToRedisReply(c,lua);
|
||||||
|
lua_gc(lua,LUA_GCSTEP,1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user