- 21 6月, 2014 2 次提交
- 22 5月, 2014 2 次提交
-
-
由 antirez 提交于
When we are blocked and a few events a processed from time to time, it is smarter to call the event handler a few times in order to handle the accept, read, write, close cycle of a client in a single pass, otherwise there is too much latency added for clients to receive a reply while the server is busy in some way (for example during the DB loading).
-
由 antirez 提交于
When the listening sockets readable event is fired, we have the chance to accept multiple clients instead of accepting a single one. This makes Redis more responsive when there is a mass-connect event (for example after the server startup), and in workloads where a connect-disconnect pattern is used often, so that multiple clients are waiting to be accepted continuously. As a side effect, this commit makes the LOADING, BUSY, and similar errors much faster to deliver to the client, making Redis more responsive when there is to return errors to inform the clients that the server is blocked in an not interruptible operation.
-
- 23 4月, 2014 1 次提交
-
-
由 antirez 提交于
When we set a protocol error we should return with REDIS_ERR to let the caller know it should stop processing the client. Bug found in a code auditing related to issue #1699.
-
- 10 3月, 2014 1 次提交
-
-
由 Matt Stancliff 提交于
anetTcpAccept returns ANET_ERR, not AE_ERR. This isn't a physical error since both ANET_ERR and AE_ERR are -1, but better to be consistent.
-
- 25 1月, 2014 1 次提交
-
-
由 antirez 提交于
-
- 26 12月, 2013 1 次提交
-
-
由 antirez 提交于
-
- 22 12月, 2013 1 次提交
-
-
由 antirez 提交于
-
- 21 12月, 2013 1 次提交
-
-
由 antirez 提交于
-
- 11 12月, 2013 1 次提交
-
-
由 Yossi Gottlieb 提交于
-
- 10 12月, 2013 2 次提交
-
-
由 antirez 提交于
Starting with Redis 2.8 masters are able to detect timed out slaves, while before 2.8 only slaves were able to detect a timed out master. Now that timeout detection is bi-directional the following problem happens as described "in the field" by issue #1449: 1) Master and slave setup with big dataset. 2) Slave performs the first synchronization, or a full sync after a failed partial resync. 3) Master sends the RDB payload to the slave. 4) Slave loads this payload. 5) Master detects the slave as timed out since does not receive back the REPLCONF ACK acknowledges. Here the problem is that the master has no way to know how much the slave will take to load the RDB file in memory. The obvious solution is to use a greater replication timeout setting, but this is a shame since for the 0.1% of operation time we are forced to use a timeout that is not what is suited for 99.9% of operation time. This commit tries to fix this problem with a solution that is a bit of an hack, but that modifies little of the replication internals, in order to be back ported to 2.8 safely. During the RDB loading time, we send the master newlines to avoid being sensed as timed out. This is the same that the master already does while saving the RDB file to still signal its presence to the slave. The single newline is used because: 1) It can't desync the protocol, as it is only transmitted all or nothing. 2) It can be safely sent while we don't have a client structure for the master or in similar situations just with write(2).
-
由 antirez 提交于
-
- 05 12月, 2013 1 次提交
-
-
由 antirez 提交于
-
- 03 12月, 2013 2 次提交
- 04 10月, 2013 1 次提交
-
-
由 antirez 提交于
Since we started sending REPLCONF ACK from slaves to masters, the lastinteraction field of the client structure is always refreshed as soon as there is room in the socket output buffer, so masters in timeout are detected with too much delay (the socket buffer takes a lot of time to be filled by small REPLCONF ACK <number> entries). This commit only counts data received as interactions with a master, solving the issue.
-
- 27 8月, 2013 2 次提交
- 12 8月, 2013 1 次提交
-
-
由 antirez 提交于
-
- 24 7月, 2013 2 次提交
- 17 7月, 2013 1 次提交
-
-
由 antirez 提交于
There are systems that when printing +/- infinte with printf-family functions will not use the usual "inf" "-inf", but different strings. Handle that explicitly. Fixes issue #930.
-
- 11 7月, 2013 8 次提交
-
-
由 antirez 提交于
-
由 antirez 提交于
We now also use it in CLIENT KILL implementation.
-
由 antirez 提交于
The function returns an unique identifier for the client, as ip:port for IPv4 and IPv6 clients, or as path:0 for Unix socket clients. See the top comment in the function for more info.
-
由 antirez 提交于
-
由 Geoff Garside 提交于
Any places which I feel might want to be updated to work differently with IPv6 have been marked with a comment starting "IPV6:". Currently the only comments address places where an IP address is combined with a port using the standard : separated form. These may want to be changed when printing IPv6 addresses to wrap the address in [] such as [2001:db8::c0:ffee]:6379 instead of 2001:db8::c0:ffee:6379 as the latter format is a technically valid IPv6 address and it is hard to distinguish the IPv6 address component from the port unless you know the port is supposed to be there.
-
由 Geoff Garside 提交于
Increase the size of character buffers being used to store printable IP addresses so that they can safely store IPv6 addresses.
-
由 Geoff Garside 提交于
In two places buffers have been created with a size of 128 bytes which could be reduced to INET6_ADDRSTRLEN to still hold a full IP address. These places have been marked as they are presently big enough to handle the needs of storing a printable IPv6 address.
-
由 Geoff Garside 提交于
Add the additional ip buffer length argument to function calls of anetTcpAccept and anetPeerToString in network.c and cluster.c
-
- 30 5月, 2013 1 次提交
-
-
由 antirez 提交于
This feature allows the user to specify the minimum number of connected replicas having a lag less or equal than the specified amount of seconds for writes to be accepted.
-
- 27 5月, 2013 2 次提交
-
-
由 antirez 提交于
-
由 antirez 提交于
This special command is used by the slave to inform the master the amount of replication stream it currently consumed. it does not return anything so that we not need to consume additional bandwidth needed by the master to reply something. The master can do a number of things knowing the amount of stream processed, such as understanding the "lag" in bytes of the slave, verify if a given command was already processed by the slave, and so forth.
-
- 25 5月, 2013 3 次提交
-
-
由 antirez 提交于
-
由 antirez 提交于
When master send commands, there is no need for the slave to reply. Redis used to queue the reply in the output buffer and discard the reply later, this is a waste of work and it is not clear why it was this way (I sincerely don't remember). This commit changes it in order to don't queue the reply at all. All tests passing.
-
由 antirez 提交于
We don't write the output buffer to the client socket for slaves only if the slave is not online.
-
- 06 3月, 2013 1 次提交
-
-
由 antirez 提交于
A new server.orig_commands table was added to the server structure, this contains a copy of the commant table unaffected by rename-command statements in redis.conf. A new API lookupCommandOrOriginal() was added that checks both tables, new first, old later, so that rewriteClientCommandVector() and friends can lookup commands with their new or original name in order to fix the client->cmd pointer when the argument vector is renamed. This fixes the segfault of issue #986, but does not fix a wider range of problems resulting from renaming commands that actually operate on data and are registered into the AOF file or propagated to slaves... That is command renaming should be handled with care.
-
- 12 2月, 2013 1 次提交
-
-
由 antirez 提交于
-
- 11 2月, 2013 1 次提交
-
-
由 antirez 提交于
-