Skip to content

Commit

Permalink
now the size of the shared pool can be really modified via config, al…
Browse files Browse the repository at this point in the history
…so the number of objects in the sharing pool is logged when the log level is set to debug. Thanks to Aman Gupta
  • Loading branch information
antirez committed Jul 17, 2009
1 parent 8034b0f commit 21aecf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redis.c
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 21aecf4

Please sign in to comment.