mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
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
This commit is contained in:
parent
8034b0f9e0
commit
21aecf4bab
4
redis.c
4
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)) {
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user