]> git.saurik.com Git - redis.git/commitdiff
now the size of the shared pool can be really modified via config, also the number...
authorantirez <antirez@gmail.com>
Fri, 17 Jul 2009 09:56:56 +0000 (11:56 +0200)
committerantirez <antirez@gmail.com>
Fri, 17 Jul 2009 09:56:56 +0000 (11:56 +0200)
redis.c

diff --git a/redis.c b/redis.c
index f4fa061776a14313c776fc6b42cbfbf71bd212ee..d44e900f1e282c309acdf575fa8ca4cac34cb916 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -751,7 +751,7 @@ static int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientD
 
     /* Show information about connected clients */
     if (!(loops % 5)) {
 
     /* 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,
             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.dbfilename = "dump.rdb";
     server.requirepass = NULL;
     server.shareobjects = 0;
+    server.sharingpoolsize = 1024;
     server.maxclients = 0;
     server.maxmemory = 0;
     ResetServerSaveParams();
     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.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);
     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);