提交 21aecf4b 编写于 作者: A antirez

now the size of the shared pool can be really modified via config, also the...

now the size of the shared pool can be really modified via config, also the number of objects in the sharing pool is logged when the log level is set to debug. Thanks to Aman Gupta
上级 8034b0f9
......@@ -751,7 +751,7 @@ static int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientD
/* Show information about connected clients */
if (!(loops % 5)) {
redisLog(REDIS_DEBUG,"%d clients connected (%d slaves), %zu bytes in use",
redisLog(REDIS_DEBUG,"%d clients connected (%d slaves), %zu bytes in use, %d shared objects",
listLength(server.clients)-listLength(server.slaves),
listLength(server.slaves),
server.usedmemory,
......@@ -900,6 +900,7 @@ static void initServerConfig() {
server.dbfilename = "dump.rdb";
server.requirepass = NULL;
server.shareobjects = 0;
server.sharingpoolsize = 1024;
server.maxclients = 0;
server.maxmemory = 0;
ResetServerSaveParams();
......@@ -930,7 +931,6 @@ static void initServer() {
server.el = aeCreateEventLoop();
server.db = zmalloc(sizeof(redisDb)*server.dbnum);
server.sharingpool = dictCreate(&setDictType,NULL);
server.sharingpoolsize = 1024;
if (!server.db || !server.clients || !server.slaves || !server.monitors || !server.el || !server.objfreelist)
oom("server initialization"); /* Fatal OOM */
server.fd = anetTcpServer(server.neterr, server.port, server.bindaddr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册