4cba71e898
Fixed typo in comment: "te" -> "the".
2012-03-29 09:33:29 +02:00
179e54d2a9
Fix for slaves chains. Force resync of slaves (simply disconnecting them) when SLAVEOF turns a master into a slave.
2012-03-29 09:24:02 +02:00
d194905449
use server.unixtime instead of time(NULL) where possible (cluster.c not checked though)
2012-03-27 17:39:58 +02:00
ae22bf1ef6
Reclaim space from the client querybuf if needed.
2012-03-14 15:32:30 +01:00
d19015be12
Process async client checks like client timeouts and BLPOP timeouts incrementally using a circular list.
2012-03-13 18:05:11 +01:00
bbaeda402c
Added a qbuf-free field to CLIENT LIST output.
2012-03-13 13:26:33 +01:00
e74dca73d9
Client creation time in redisClient structure. New age field in CLIENT LIST output.
2012-03-13 13:05:08 +01:00
573373802e
c->bufpos initialization moved for aesthetics.
2012-03-13 12:59:27 +01:00
7b845b6228
anetPeerToString() automatically populates ip/port with something that may be provided to the user as output in case of errors.
2012-03-07 11:30:30 +01:00
6e09ad1c15
Return ASAP from checkClientOutputBufferLimits() if c->reply_bytes is zero.
2012-02-16 12:20:56 +01:00
609baba8a2
Fixes to c->reply_bytes computation, and debug messages to closely study the behavior of memory pressure + slaves + maxmemory + blocked slaves.
2012-02-07 17:41:31 +01:00
442246dde2
Precision of getClientOutputBufferMemoryUsage() greatily improved, see issue #327 for more information.
2012-02-07 13:05:36 +01:00
8b7c3455b9
freeMemoryIfNeeded() minor refactoring
2012-02-06 16:56:42 +01:00
f6b32c14f4
This fixes issue #327 , is a very complex fix (unfortunately), details:
...
1) sendReplyToClient() now no longer stops transferring data to a single
client in the case we are out of memory (maxmemory-wise).
2) in processCommand() the idea of we being out of memory is no longer
the naive zmalloc_used_memory() > server.maxmemory. To say if we can
accept or not write queries is up to the return value of
freeMemoryIfNeeded(), that has full control about that.
3) freeMemoryIfNeeded() now does its math without considering output
buffers size. But at the same time it can't let the output buffers to
put us too much outside the max memory limit, so at the same time it
makes sure there is enough effort into delivering the output buffers to
the slaves, calling the write handler directly.
This three changes are the result of many tests, I found (partially
empirically) that is the best way to address the problem, but maybe
we'll find better solutions in the future.
2012-02-04 14:05:54 +01:00
355f859134
Use less memory when emitting the protocol, by using more shared objects for commonly emitted parts of the protocol.
2012-02-04 08:58:37 +01:00
c715c9b8bf
Fixed typo in getClientLimitClassByName()
2012-01-25 18:07:56 +01:00
2f0f0d95c0
lenght -> length
2012-01-24 15:33:15 +01:00
7957c67604
after all closing a client for output buffer limit overcoming is a WARNING level message.
2012-01-24 12:03:48 +01:00
7fe8d49a70
Client output buffer limits: configuration of parameters for the different classes of clients implemented.
2012-01-24 10:43:30 +01:00
06b3dced99
asyncCloseClientOnOutputBufferLimitReached() now ignores clients with REDIS_CLOSE_ASAP flag already set. Return value of the function changed from int to void since it is not used. Fixed logging of the client scheduled to be closed.
2012-01-24 09:32:39 +01:00
51669c5ac1
client buffer handling refactoring and optimization
2012-01-23 17:15:49 +01:00
7eac2a75a4
Implementation of the internals that make possible to terminate clients overcoming configured output buffer (soft and hard) limits.
2012-01-23 16:12:37 +01:00
498dc5557c
Introduced three client limit classes: normal, slave, pubsub
2012-01-17 12:43:01 +01:00
3853c16839
Track the length of the client pending output buffers (still to transfer) in a new field in the client structure.
2012-01-17 12:23:25 +01:00
00010fa96f
On crash print information about the current client (if any), command vector, and object associated to first argument assuming it is a key.
2012-01-12 16:02:57 +01:00
11e0c4c55b
Protections against protocol desyncs, leading to infinite query buffer growing, due to nul-terms in specific bytes of the request or indefinitely long multi bulk or bulk count strings without newlines. This bug is related to Issue #141 as well.
2011-12-31 16:09:46 +01:00
1824e3a3a3
Fixed replication when multiple slaves are attaching at the same time. The output buffer was not copied correctly between slaves. This fixes issue #141 .
2011-12-30 19:40:43 +01:00
1844f9900f
server.replstate -> server.repl_state
2011-12-21 12:23:18 +01:00
0a466a7542
Fixed memleak in CLIENT INFO, added simple test that will work as regression test on mac os x and in the CI when running over valgrind. This fixes issue #256
2011-12-19 10:16:37 +01:00
63fd13996d
show initial querybuf bytes on querybuf overflow.
2011-11-28 11:12:55 +01:00
3e0a975e07
log client protocol errors for log level >= verbose
2011-11-25 16:09:34 +01:00
45e7a1ce00
minor refactoring to networking.c adding a separated function to get a string representing the current state of all the connected clients.
2011-11-24 15:04:42 +01:00
2c74a9f948
last executed command in CLIENT LIST output.
2011-11-24 14:56:34 +01:00
3c95e7212e
new counter in INFO output: rejected_connections with number of dropped connections because of maxclients limit reached.
2011-11-23 18:38:12 +01:00
afd0f06b75
Fixed bug in getClientInfoString() that was not rendering the N (no flags) special flag correctly.
2011-11-21 16:19:30 +01:00
becf5fdb0c
Close client connection and log the event when the client input buffer reaches 1GB.
2011-11-21 16:17:51 +01:00
6621b8ffa1
show active events in client file descriptor in CLIENT LIST.
2011-11-21 16:06:03 +01:00
491c1c4e04
added output list and buffer length, query buffer size, to CLIENT LIST output.
2011-11-21 15:54:49 +01:00
17d25a33e2
code generating the CLIENT LIST output refactored to have a function that is able to render a single client into a client info string.
2011-11-21 15:34:32 +01:00
b90314588f
useless double if removed.
2011-11-08 11:26:06 +01:00
b0a2e34059
yet another #if REDIS_MBULK_BIG_ARG removed.
2011-11-08 11:24:12 +01:00
53272781d0
Multi bulk optimization for creating big objects without copying data is no longer optional, #ifdefs removed. Also debugging messages removed.
2011-11-08 11:22:40 +01:00
ca908473e8
A comment moved a few lines for clarity.
2011-11-04 11:18:15 +01:00
94d490b9f6
Added a define to set the size threshold to enable the multi bulk parsing big objects optimization.
2011-11-04 11:16:11 +01:00
826b5beb9c
further optimizations for the multi bulk protocol parsing code when big objects are transmitted to Redis.
2011-11-03 15:53:40 +01:00
9217095572
optimized object creation in multi-bulk protocol parsing
2011-11-02 17:30:19 +01:00
b8d743e181
sdsIncrLen() / sdsMakeRoomFor() used to avoid copying to intermediate buffer while reading the client query.
2011-11-02 16:52:45 +01:00
58732c23d5
maxclients configuration is now implemented dealing with the actual process rlimits. Setting maxclients to 0 no longer makes sense and is now invalid, the new default is 10000.
...
See issue #162 for more information.
2011-10-31 10:49:27 +01:00
6856c7b4d6
First implementation of the ASKING command. Semantics still to verify.
2011-10-17 17:35:23 +02:00
eab0e26e03
replaced redisAssert() with redisAssertWithInfo() in a shitload of places.
2011-10-04 18:43:03 +02:00