- 30 Aug, 2012 2 commits
-
-
antirez authored
A Redis slave can now be configured with a priority, that is an integer number that is shown in INFO output and can be get and set using the redis.conf file or the CONFIG GET/SET command. This field is used by Sentinel during slave election. A slave with lower priority is preferred. A slave with priority zero is never elected (and is considered to be impossible to elect even if it is the only slave available). A next commit will add support in the Sentinel side as well.
-
antirez authored
This change is required to make Redis 2.4 compatible with Sentinel. The Run ID is a field that identifies a single execution of the Redis server. It can be useful for many purposes as it makes easy to detect if the instance we are talking about is the same, or if it is a different one or was rebooted. An application of run_id will be in the partial synchronization of replication, where a slave may request a partial sync from a given offset only if it is talking with the same master. Another application is in failover and monitoring scripts.
-
- 09 Jul, 2012 1 commit
-
-
antirez authored
The REPLCONF command is an internal command (not designed to be directly used by normal clients) that allows a slave to set some replication related state in the master before issuing SYNC to start the replication. The initial motivation for this command, and the only reason currently it is used by the implementation, is to let the slave instance communicate its listening port to the slave, so that the master can show all the slaves with their listening ports in the "replication" section of the INFO output. This allows clients to auto discover and query all the slaves attached into a master. Currently only a single option of the REPLCONF command is supported, and it is called "listening-port", so the slave now starts the replication process with something like the following chat: REPLCONF listening-prot 6380 SYNC Note that this works even if the master is an older version of Redis and does not understand REPLCONF, because the slave ignores the REPLCONF error. In the future REPLCONF can be used for partial replication and other replication related features where there is the need to exchange information between master and slave. NOTE: This commit also fixes a bug: the INFO outout already carried information about slaves, but the port was broken, and was obtained with getpeername(2), so it was actually just the ephemeral port used by the slave to connect to the master as a client.
-
- 12 May, 2012 1 commit
-
-
antirez authored
If a large amonut of keys are all expiring about at the same time, the "active" expired keys collection cycle used to block as far as the percentage of already expired keys was >= 25% of the total population of keys with an expire set. This could block the server even for many seconds in order to reclaim memory ASAP. The new algorithm uses at max a small amount of milliseconds per cycle, even if this means reclaiming the memory less promptly it also means a more responsive server.
-
- 21 Apr, 2012 1 commit
-
-
antirez authored
Two limits are added: 1) Up to SLOWLOG_ENTRY_MAX_ARGV arguments are logged. 2) Up to SLOWLOG_ENTRY_MAX_STRING bytes per argument are logged. 3) slowlog-max-len is set to 128 by default (was 1024). The number of remaining arguments / bytes is logged in the entry so that the user can understand better the nature of the logged command.
-
- 29 Mar, 2012 2 commits
-
-
Joseph Jang authored
occurs when two or more dbs are replicated and at least one of them is >db10
-
antirez authored
Fix for slaves chains. Force resync of slaves (simply disconnecting them) when SLAVEOF turns a master into a slave.
-
- 15 Feb, 2012 4 commits
-
-
antirez authored
-
antirez authored
-
antirez authored
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.
-
antirez authored
Initial version of c->reply_bytes implementation backported from unstable to 2.4, in order to apply issue 327 patches.
-
- 02 Feb, 2012 1 commit
-
-
antirez authored
-
- 12 Jan, 2012 1 commit
-
-
antirez authored
On crash print information about the current client (if any), command vector, and object associated to first argument assuming it is a key.
-
- 07 Jan, 2012 2 commits
-
-
antirez authored
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.
-
antirez authored
Fixed replication when multiple slaves are attaching at the same time. The output buffer was not copied correctly between slaves. This fixes issue #141.
-
- 24 Nov, 2011 3 commits
- 21 Nov, 2011 2 commits
- 11 Nov, 2011 2 commits
- 18 Oct, 2011 2 commits
-
-
Herbert G. Fischer authored
-
Herbert G. Fischer authored
-
- 10 Oct, 2011 1 commit
-
-
Nathan Florea authored
Added a configuration directive to allow a user to specify the permissions to be granted to the Unix socket file. I followed the format Pieter and Salvatore discusses in issue #85 ( https://github.com/antirez/redis/issues/85).
-
- 19 Sep, 2011 2 commits
- 12 Jul, 2011 3 commits
-
-
antirez authored
-
antirez authored
Take a pointer to the relevant entry of the command table in the client structure. This is generally a more sounding design, simplifies a few functions prototype, and as a side effect fixes a bug related to the conversion of EXPIRE -1 to DEL: before of this fix Redis tried to convert it into an EXPIREAT in the AOF code, regardless of our rewrite of the command.
-
antirez authored
dataspace change hook functions backported to 2.4. They are just wrappers at this point but this makes simpler to cherry-pick between branches.
-
- 01 Jul, 2011 2 commits
- 17 Jun, 2011 1 commit
-
-
antirez authored
-
- 14 Jun, 2011 1 commit
-
-
antirez authored
-
- 10 Jun, 2011 1 commit
-
-
antirez authored
-
- 08 Jun, 2011 1 commit
-
-
antirez authored
INFO now contains the time (in usecs) needed to fork() in order to persist. The info is available in the stats section of INFO.
-
- 31 May, 2011 1 commit
-
-
antirez authored
-
- 30 May, 2011 1 commit
-
-
Pieter Noordhuis authored
-
- 22 May, 2011 2 commits
-
-
Pieter Noordhuis authored
-
Pieter Noordhuis authored
-