- 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 提交于
-
- 05 2月, 2013 1 次提交
-
-
由 antirez 提交于
-
- 28 1月, 2013 1 次提交
-
-
由 antirez 提交于
decrRefCount used to get its argument as a void* pointer in order to be used as destructor where a 'void free_object(void*)' prototype is expected. However this made simpler to introduce bugs by freeing the wrong pointer. This commit fixes the argument type and introduces a new wrapper called decrRefCountVoid() that can be used when the void* argument is needed.
-
- 19 1月, 2013 3 次提交
- 15 1月, 2013 2 次提交
-
-
由 antirez 提交于
-
由 antirez 提交于
Sometimes it is much simpler to debug complex Redis installations if it is possible to assign clients a name that is displayed in the CLIENT LIST output. This is the case, for example, for "leaked" connections. The ability to provide a name to the client makes it quite trivial to understand what is the part of the code implementing the client not releasing the resources appropriately. Behavior: CLIENT SETNAME: set a name for the client, or remove the current name if an empty name is set. CLIENT GETNAME: get the current name, or a nil. CLIENT LIST: now displays the client name if any. Thanks to Mark Gravell for pushing this idea forward.
-
- 03 1月, 2013 1 次提交
-
-
由 antirez 提交于
-
- 03 12月, 2012 2 次提交
-
-
由 antirez 提交于
Refactoring performed after issue #801 resolution (see commit 2f87cf8b) introduced a memory leak that is fixed by this commit. I simply forgot to free the new allocated dictionary in the client structure trusting the output of "make test" on OSX. However due to changes in the "leaks" utility the test was no longer testing memory leaks. This problem was also fixed. Fortunately the CI test running at ci.redis.io spotted the bug in the valgrind run. The leak never ended into a stable release.
-
由 antirez 提交于
To store the keys we block for during a blocking pop operation, in the case the client is blocked for more data to arrive, we used a simple linear array of redis objects, in the blockingState structure: robj **keys; int count; However in order to fix issue #801 we also use a dictionary in order to avoid to end in the blocked clients queue for the same key multiple times with the same client. The dictionary was only temporary, just to avoid duplicates, but since we create / destroy it there is no point in doing this duplicated work, so this commit simply use a dictionary as the main structure to store the keys we are blocked for. So instead of the previous fields we now just have: dict *keys; This simplifies the code and reduces the work done by the server during a blocking POP operation.
-