Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: antirez/redis
head fork: antirez/redis
Checking mergeability… Don't worry, you can still create the pull request.
This comparison is big! We're only showing the most recent 250 commits
Commits on Jul 27, 2011
@pietern pietern Fix adding bulk reply when getcwd fails a830d94
Commits on Jul 29, 2011
@antirez Version bumped to 2.3.8 753e91b
@antirez Release notes for 2.4.0-RC5 55eea93
@antirez fixed assert proc on Redis test ed9f997
@antirez 243b783 a57bd79
Commits on Aug 09, 2011
@antirez Auto rewrite integer overflow fixed. Thanks to Gaurav for finding it …
…(see issue 602 on google code), and Pieter Noordhuis for tracing it.
@antirez Version bumped to 2.3.9. Changelog modified accordingly. 214cf63
Commits on Sep 12, 2011
@hampus hampus Fix crash when chaining brpoplpush with other blocking commands. cbf01c0
@antirez fixed typos in the comments of rpoplpushHandlePush() b10913b
@antirez regression test for bug 593 added 00c7f31
@antirez Remove the write handler only if there are no longer objects in the o…
…utput queue AND if the static buffer is empty. This bug was the cause of a possible server-stop-responding-to-client bug under some specific work load. Thanks to Pieter Noordhuis for spotting and fixing it.
@antirez Version bumped to 2.3.10, changelog updated da30c9e
Commits on Sep 13, 2011
@pietern pietern Avoid unnecessary calls to time(3) 8d9804b
@antirez added a newline for code readability 2401c3e
@pietern pietern Fix indent f602318
@pietern pietern Re-use AOF buffer when it is small enough 0fb6212
@pietern pietern Speed up protocol synthesis for AOF 325d2eb
Commits on Sep 14, 2011
@antirez bio.o added to redis-server objects c427f5d
@antirez bio.c typos fixes to make it compile ed56ad5
@antirez add background jobs initialization to Redis main init function af14408
@antirez typo fixed in bio.c 5ca7575
@antirez use pthread_cond_signal() to make sure the background thread will pro…
…cess the job.
@antirez debug message removed a72c042
@antirez make bio_list static as well 44690ab
@pietern pietern Asynchronously close old file after BGREWRITEAOF 84f48cc
@antirez use bio.c instead of libeio for closing the AOF file in background. S…
…ome comment added and other minor changes.
@antirez Don't replicate/AOF SAVE b7bf290
@antirez Optimize LRANGE to scan the list starting from the head or the tail i…
…n order to traverse the minimal number of elements. Thanks to Didier Spezia for noticing the problem and providing a patch.
Commits on Sep 15, 2011
@antirez Implemented --latency in redis-cli 2e48ad5
@antirez Fixed a bug in the average latency metering of redis-cli --latency 6fd1a72
Commits on Sep 16, 2011
@pietern pietern Fix AOF race that may duplicate commands 682b633
@pietern pietern Enforce upper bound for number of requests in redis-benchmark e3d1c8b
@pietern pietern Failing test related to AOF rewrite buffers b9a6568
@antirez commenting out aof-race test for now, waiting for a fix to issue #80 481a05c
Commits on Sep 19, 2011
@antirez Background I/O library enhanced so that the main thread can query for…
… the number of pending jobs of the specified type.
@antirez Better comments for bioWaitPendingJobsLE 411cb75
@antirez Use a different thread for every different type of background job c67e8d3
@antirez Remove backgroud jobs from the queue only when the processing was com…
…pleted, and not just started.
@antirez some more comment about bio.c design 2eae7cb
@antirez fixed a problem in bioOlderJobType() when there are no jobs of the sp…
…ecified type. Now the function returns 0 when this happens.
@antirez REDIS_BIO_AOF_FSYNC implemented 3ae56d8
@antirez Added aof_backgronud_fsync() function, and use it in the bacground re…
…write done handler when the fsync policy is everysec.
@antirez Fixed typo preventing compilation 056c2ac
@antirez postpone the AOF fsync if policy is everysec and there is a backgroun…
…d fsync already going.
@antirez fixed flushAppendOnlyFile() function prototype to reflect the new imp…
…lementation, fixing compilation.
@antirez use aof_fsync wrapper instead of fsync(2) in bio.c 01ac844
@antirez Emit a log message when AOF fsync is still in progress but we are for…
…ced to write from the main thread since two seconds already elapsed.
@antirez Comment out things in bio.c that are currently not useful but that ma…
…y be useful in the future.
@antirez Fixed comment typo 1f164f4
Commits on Sep 20, 2011
@antirez Include port number in error when can't bind lisetning port on startup. a511ce1
@kmerenkov kmerenkov [issue 620] don't segfault if number of arguments is less than 1 2017d8b
@annulen annulen Fixed compilation on Mac/PPC
Applied patch from Issue 119 provided by
@vambo vambo Corrected typo in documentation for R_Zero, R_PosInf, R_NegInf, R_Nan; 57f611d
@antirez hash zipmap max entries and entry size information removed from INFO …
…command since we have this info and the equivalent info for sets, hashes, zset accessible via the CONFIG GET command.
@antirez no longer valid design documents removed a58e486
Commits on Sep 21, 2011
@antirez Version bumped to 2.3.11 902a656
@antirez Release notes for Redis 2.4 RC8 added 9286ecd
@jvain jvain fixed a small bug that caused redis-cli to segfault when given single…
… numeric parameter greater that zero.
Commits on Sep 29, 2011
@antirez Compilation fixed on OpenBSD making sure that _XOPEN_SOURCE is set to…
… 700 in fmacros.h
Commits on Oct 04, 2011
@antirez Redis test ports selection made more robust. This prevents the test f…
…rom hanging if an already bound port is selected but the TCP server listening to it does not cause a protocol error with a Redis client PING. Also base port moved away from the range near to the Redis Cluster gossip ports.
Commits on Oct 06, 2011
@antirez CONFIG SET/GET support for loglevel 0e841b9
Commits on Oct 10, 2011
@antirez Added two new tests for RENAME, currently both will fail because of bug a6e312b
@antirez Fix for bug #128 about the RENAME command. 067ad37
@antirez Issue #131. stime/utime reported in INFO was inverted. Fixed thanks t…
…o Didier Spezia.
@florean florean Unlink Unix socket file on shutdown 1ca8dee
@florean florean Added a config directive for a Unix socket mask
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 (
@antirez Fix for issue #132. Now AUTH raises an error if no server password is…
… configured.
Commits on Oct 14, 2011
@antirez More informative error when DEBUG RELOAD fails. 71bb31b
@antirez redis-check-dump: RDB version 2 now supported. 8185c2e
@antirez Exit with Fatal error at startup if the RDB file signature or version…
… is wrong.

Ref: issue #103
@antirez Version bumped to 2.4.0 0c71939
@antirez 2.4.0 Release notes. a502f48
Commits on Oct 17, 2011
@antirez FLUSHALL will only perform a blocking SAVE if RDB persistence is conf…
@antirez FLUSHALL now prevents rdbSave() from resetting the dirty counter, so …
…that the command will get replicated and put inside the AOF. This fixes issue #142
@antirez Regression test for issue #142 added 6662806
@antirez revert version bumping to 2.4.1, put in the previous commit for an er…
@antirez version bumped to 2.4.1 5ab72be
@antirez 2.4.1 release notes. ab648d9
Commits on Oct 18, 2011
@antirez Return from syncWithMaster() ASAP if the event fired but the instance…
… is no longer a slave. This should fix Issue #145.
@smly smly Fixed a small memory leak I found with valgrind 1270a13
@antirez Fix to the previous fix for issue #145, make sure to return only afte…
…r the event was unregistered.
Herbert G. Fischer Added repl_ping_slave_period and repl_timeout options support 7c6da73
Herbert G. Fischer fixed typo in comments 421f6af
Herbert G. Fischer fixed source indenting 1fe4cd5
Commits on Oct 21, 2011
@florean florean Set errno to 0 before calling strtol. 1126d5a
Commits on Oct 23, 2011
@antirez Script to install the server in Ubuntu/Debian added to 2.4 as well. 9a3a84b
@antirez template files for installation script added 1e81d97
@antirez removed a few entries for gitignore 0327d9b
@antirez Better installation info inside README file. 45bd4a1
Commits on Oct 26, 2011
@antirez Clear the AOF rewrite scheduled flag once an AOF rewrite is triggered…
…. Fix for issue #161, probably fixing 159 as well.
@antirez Merge pull request #154 from florean/2.4
@antirez Redis 2.4.2 072a905
Commits on Oct 28, 2011
@antirez sds.c single quotes support cacab3b
@antirez Fixed a memory leak in redis-cli.c 7d31a02
Commits on Oct 31, 2011
@antirez It is now possible to disable password authentication via CONFIG SET.…
… Thanks to Jan Oberst. This closes issue #171.
@antirez Merge pull request #149 from hgfischer/2.4
repl_ping_slave_period and repl_timeout configs
@antirez added more clarifications in redis.conf about ther right value to set…
… as replication timeout.
@antirez use timeout 0 by default, as this is a common source of problems. 18fe946
Commits on Nov 11, 2011
@antirez set default client timeout to zero inside redis.h as well 3fac86f
@antirez I/O buffer length enlarged beb4bac
Commits on Nov 16, 2011
@lamby lamby Fix crash on SPARC due to improper alignment of allocated memory
I believe that you should be able to drop 'defined(__sun)' completely
from this clause, as Solaris on x86 hardware probably does not have
strict alignment requirements, but I don't have a way to test that.

Thanks to Jurij Smakov <>.

Signed-off-by: Chris Lamb <>
Commits on Nov 21, 2011
@antirez Max log message length set to 4k to avoid truncated INFO output in lo…
…gs on Redis crash. This is just a workaround and it is handled better in the unstable branch.
@antirez Added sdscatsds() to sds.c/h 0b1531e
@antirez code generating the CLIENT LIST output refactored to have a function …
…that is able to render a single client into a client info string.
@antirez added output list and buffer length, query buffer size, to CLIENT LIS…
…T output.
@antirez new ae.c API to get current events by file descriptor. 713b4c5
@antirez show active events in client file descriptor in CLIENT LIST. 93babe4
@antirez Close client connection and log the event when the client input buffe…
…r reaches 1GB.
@antirez Fixed bug in getClientInfoString() that was not rendering the N (no f…
…lags) special flag correctly.
@antirez Redis 2.4.3 6a252e9
Commits on Nov 24, 2011
@antirez last executed command in CLIENT LIST output. 3852e2a
@antirez minor refactoring to networking.c adding a separated function to get …
…a string representing the current state of all the connected clients.
@antirez better bug report info on crash (backported from unstable) 8a82ee0
Commits on Nov 25, 2011
@woowenjie woowenjie clean REDIS_DIRTY_CAS when discard Command runs. otherwise the next M…
…ULTI/EXEC may fail in the same RedisClient
@antirez Added regression tests for issue #209 fcf5783
@antirez log client protocol errors for log level >= verbose 7558b1f
@jbergstroem jbergstroem Update to jemalloc 2.2.5 a9c2f0f
@antirez jemalloc gitignore updated to jemalloc 2.2.5 241e3cf
@antirez show initial querybuf bytes on querybuf overflow. 0f2199e
Commits on Nov 28, 2011
@antirez two new AOF related INFO fields that can be interesting information f…
…or debugging.
@antirez Redis 2.4.4 54a2934
Commits on Nov 30, 2011
@antirez --quiet option implemented in the Redis test. Output improved a bit. 901120f
@antirez Replication bug fixed: now non blocking connect is also forced to fol…
…low the configured replication timeout.
Commits on Dec 01, 2011
@antirez Fixed SORT bugs (issue #224) with regression tests. bc62bc5
Commits on Dec 18, 2011
@antirez added assertion in zslInsert() that ensures the inserted element scor…
…e is not NaN
Commits on Dec 19, 2011
@antirez Fixed memleak in CLIENT INFO, added simple test that will work as reg…
…ression test on mac os x and in the CI when running over valgrind. This fixes issue #256
@antirez unit/introspection added among tests executed by default c08eb8e
@antirez unit/introspection.tcl added 8a6b21d
Commits on Dec 20, 2011
@antirez Redis test port allocation fixed. 8a62502
@antirez Redis test: two redundant tests removed as they tend to create issues…
… when running the test with valgrind.
@antirez Redis test: vaoid two false positives while running under valgrind. 2e68921
Commits on Dec 23, 2011
@antirez Prevent NaN scores in sorted sets resulting from calls to ZUNIONSTORE…
@antirez Added regression test for ZUNIONSTORE creating NaN (github issue #264) 5bb2565
@antirez Redis 2.4.5 273f410
Commits on Jan 07, 2012
@antirez List connected slaves with ip,port,state information in INFO, as requ…
…ested by github issue #219
@antirez Do not propagate DEBUG LOADAOF 8939ff1
@antirez Fixed replication when multiple slaves are attaching at the same time…
…. The output buffer was not copied correctly between slaves. This fixes issue #141.
@antirez Protections against protocol desyncs, leading to infinite query buffe…
…r 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 Regression tests for protocol desync bug related to Issue #141 5378578
@antirez Redis test: when assertion fails print not just the expression but al…
…so expanded values in the error message.
@antirez Regression test for the main problem causing issue #141. Minor change…
…s/fixes/additions to the test suite itself needed to write the test.
Commits on Jan 10, 2012
@antirez show GCC version in INFO output. 3b67a0f
Commits on Jan 11, 2012
@antirez error in comment fixed d0f37e2
@antirez Redis 2.4.6 e1849b6
Commits on Jan 12, 2012
@antirez On crash print information about the current client (if any), command…
… vector, and object associated to first argument assuming it is a key.
@antirez Possible fix for false positives in issue 141 regression test 8b8261e
Commits on Jan 14, 2012
@pietern pietern Don't expire keys when loading an RDB after a SYNC
The cron is responsible for expiring keys. When keys are expired at
load time, it is possible that the snapshot of a master node gets
modified. This can in turn lead to inconsistencies in the data set.

A more concrete example of this behavior follows. A user reported a
slave that would show an monotonically increase input buffer length,
shortly after completing a SYNC. Also, `INFO` output showed a single
blocked client, which could only be the master link. Investigation
showed that indeed the `BRPOP` command was fed by the master. This
command can only end up in the stream of write operations when it did
NOT block, and effectively executed `RPOP`. However, when the key
involved in the `BRPOP` is expired BEFORE the command is executed, the
client executing it will block. The client in this case, is the master
Commits on Jan 16, 2012
@antirez Merge pull request #296 from pietern/2.4-expirefix
Don't expire keys when loading an RDB after a SYNC
Commits on Feb 02, 2012
@antirez Only incremnet stats for key miss/hit when the key is semantically ac…
…cessed in read-only.
@antirez Added a server.arch_bits field instead of computing it at runtime for…
@antirez Set a 3.5 GB maxmemory limit with noeviction policy if a 32 bit insta…
…nce without user-provided memory limits is detected.
@antirez sds.c no longe pre-allocate more than 1MB of free space ahead. This f…
…ixes issue #252.
@antirez Redis 2.4.7 bad380b
Commits on Feb 14, 2012
@antirez add -f flag to cp when installing, otherwise stopping the server is
needed when installing a new Redis version. Thanks to Scott Kevill.
Fixes issue #335.
@antirez redis-check-aof is now large files safe also on 32 bit systems. 02b984c
Commits on Feb 15, 2012
@antirez Initial version of c->reply_bytes implementation backported from unst…
…able to 2.4, in order to apply issue 327 patches.
@antirez 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.
@antirez Also remove size of AOF buffers from used memory when doing the math …
…for freeMemoryIfNeeded()
@antirez freeMemoryIfNeeded() minor refactoring 35a4761
@antirez Precision of getClientOutputBufferMemoryUsage() greatily improved, se…
…e issue #327 for more information.
@antirez Fixes to c->reply_bytes computation, and debug messages to closely st…
…udy the behavior of memory pressure + slaves + maxmemory + blocked slaves.
@antirez debugging messages removed from freeMemoryIfNeeded() f27d388
@antirez redis.conf updated with new maxmemory semantics 662f25e
@antirez more practical maxmemory+slaves hint in redis.conf 31f9f98
@antirez Fixed a few broken stuff introduced while merging issue #327 related …
…code in 2.4
Commits on Feb 16, 2012
@antirez Now HINCRBY can detect overflows too. Fix for issue #330. da8bcd2
@antirez Issue #330 regression test. f0c3b24
Commits on Feb 20, 2012
@antirez Merge branch '2.4-issue327' into 2.4 cf7d3f9
Commits on Feb 21, 2012
@antirez bzero -> memset 68897a5
@antirez The hiredis lib shipped with Redis was updated to latest version. 6887744
@antirez Applied a few modifications to hiredis to tune it for speed (redis-be…
…nchmark) and ability to read more deeply nested replies (redis-cli).
@antirez Fix 32bit build of hiredis 19fb740
@antirez Added an unstalbe-alike distclean target to 2.4 Makefile. 2b0d9c5
@antirez Fixed undefined behavior in *INCR style functions overflow detection.…
… Sorry clang!
@pietern pietern Also force SIGSEGV without HAVE_BACKTRACE a0dc1e6
@pietern pietern Solaris has backtrace(3) c39b869
@antirez Merge pull request #346 from pietern/2.4-segv
Force SIGSEGV without HAVE_BACKTRACE (2.4)
Commits on Feb 22, 2012
@antirez zzlIsInRange() now is capable of handling empty sorted sets that may …
…end inside the data set when loading very old RDB files produced by early-stage versions of Redis.
@antirez Redis version 2.4.8 bd624d0
@antirez Redis-cli should accept help command even if there is no connection t…
…o the server.
@antirez Fix for issue #306, thanks to tchajed (on github) for the pull reques…
…t. The original patch was reworked a bit.
Brad Voth updated utils/ to support chkconfig boxes (redhat/
centos) as well as debian/ubuntu
@antirez The universe is 80 columns wide, accept it. a3b580c
Commits on Feb 26, 2012
@antirez redis-benchmark: backported the more capable version from the unstabl…
…e branch (pipelining,run selected tests,fixes)
Commits on Mar 18, 2012
@antirez First implementation of --test-memory. Still a work in progress. 9c3bc75
@antirez Hem... actual memtest.c file added. e306e99
@antirez Memory test function now less boring thanks to screen-wide progress bar. ae92e6d
@antirez On crash suggest to give --test-memory a try. a7e66f8
@antirez Number of iteration of --test-memory is now 300 (several minutes per …
…gigabyte). Memtest86 and Memtester links are also displayed while running the test.
@antirez Fixed typo. 015dba6
@antirez More memory tests implemented. Default number of iterations lowered t…
…o a more acceptable value of 50.
@antirez Memory test feature backported into 2.4. 8122954
@antirez Redis 2.4.9 1dfe75a
Commits on Mar 19, 2012
@antirez Memory addressing test implemented. 9a5cbf9
Commits on Mar 29, 2012
@antirez Fix for slaves chains. Force resync of slaves (simply disconnecting t…
…hem) when SLAVEOF turns a master into a slave.
@josephjang josephjang Fixed a memory leak with replication
occurs when two or more dbs are replicated and at least one of them is >db10
Commits on Mar 30, 2012
@antirez Merge pull request #417 from josephjang/e95ca1db21b2dbe82f39a3f7f6390…

a memory leak with replication on two or more dbs including >= db10
@antirez Useless GCC warning suppressed. 06665b7
@antirez Redis 2.4.10 1fa954a
Commits on Apr 04, 2012
@antirez Structure field controlling the INFO field master_link_down_since_sec…
…onds initialized correctly to avoid strange INFO output at startup when a slave has yet to connect to its master.
Commits on Apr 06, 2012
@jokea jokea implement aeWait using poll(2). Fixes issue #267. 7b4dc9b
Commits on Apr 17, 2012
@antirez lookupKeyByPattern() used by SORT GET/BY rewritten. Fixes issue #460.
lookupKeyByPattern() was implemented with a trick to speedup the lookup
process allocating two fake Redis obejcts on the stack. However now that
we propagate expires to the slave as DEL operations the lookup of the
key may result into a call to expireIfNeeded() having the stack
allocated object as argument, that may in turn use it to create the
protocol to send to the slave. But since this fake obejcts are
inherently read-only this is a problem.

As a side effect of this fix there are no longer size limits in the
pattern to be used with GET/BY option of SORT.

See #460 for bug details.
Commits on Apr 18, 2012
@antirez Marginally cleaner lookupKeyByPattern() implementation.
just fieldobj itself as sentinel of the fact a field object is used or
not, instead of using the filed length, that may be confusing both for
people and for the compiler emitting a warning.
@antirez New redis-cli backported from unstable. 922283b
Commits on Apr 19, 2012
@antirez Redis 2.4.11 f743cac
Commits on Apr 21, 2012
@antirez Limit memory used by big SLOWLOG entries.
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.
Commits on Apr 29, 2012
@antirez memtest.c fixed to actually use v1 and v2 in memtest_fill_value(). 379ac85
@antirez A few compiler warnings suppressed. 63bae7c
Commits on Apr 30, 2012
@antirez Testing framework fixes and improvements backported from 2.6. 28500d1
@antirez Redis test: More reliable BRPOPLPUSH replication test.
Now it uses the new wait_for_condition testing primitive.
Also wait_for_condition implementation was fixed in this commit to properly
escape the expr command and its argument.
@antirez A more lightweight implementation of issue 141 regression test. fb38fd3
@antirez Properly wait the slave to sync with master in BRPOPLPUSH test. fc7ea2f
@antirez Redis 2.4.12 9cb09c4
Commits on May 01, 2012
@pietern pietern Use safe dictionary iterator from KEYS
Every matched key in a KEYS call is checked for expiration. When the key
is set to expire, the call to `getExpire` will assert that the key also
exists in the main dictionary. This in turn causes a rehashing step to
be executed. Rehashing a dictionary when there is an iterator active may
result in the iterator emitting duplicate entries, or not emitting some
entries at all. By using a safe iterator, the rehash step is omitted.
Commits on May 02, 2012
@antirez Redis 2.4.13 e74fe10
Commits on May 09, 2012
@antirez Allow PREFIX to be overrided in Makefile. 2cf55e3
@antirez Fix PREFIX typo in Makefile. e2c0197
Commits on May 11, 2012
@antirez Macros ULONG_ONEZERO / ULONG_ZEROONE were inverted in #ifdef to test …
…32/64 bit arch.
@antirez memtest.c: integer overflow fixed. 6375e5d
Commits on May 12, 2012
@antirez More incremental active expired keys collection process.
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.
@antirez Comment improved so that the code goal is more clear. Thx to @agladysh. 735b0e0
@antirez If the computer running the Redis test is slow, we revert to --client…
…s 1 to avoid false positives.
@antirez redis-cli --pipe for mass import. f1af84d
@antirez redis-cli pipe mode: handle EAGAIN while writing to socket. b074461
@antirez redis-cli pipe mode: handle EINTR properly as well so that SIGSTOP/SI…
…GCONT are handled correctly.
@antirez Add an implementation of mstime() to 2.4.
Commit 9419eb0 back ported a better expired keys collection algorithm
that is more incremental but for it to compile and work we need an
implementation of the mstime() function that was missing in 2.4.
Commits on May 23, 2012
@antirez Fixed issue #516 (ZINTERSTORE mixing sets and zsets).
Weeks ago trying to fix an harmless GCC warning I introduced a bug in
the ziplist-encoded implementations of sorted sets.

The bug completely broke zuiNext() iterator, that is used in the
ZINTERSTORE and ZUNIONSTORE implementation, so those two commands are no
longer reliable starting from Redis version 2.4.12 and latest 2.6.0-RC

This commit fixes the problem and adds a regression test.
@antirez No longer used TODO file removed. 496e813
@ThePicard ThePicard Fixed a typo in 8a599d3
@jokea jokea Set fd to writable when poll(2) detects POLLERR or POLLHUP event. c6ee2fd
@antirez Redis 2.4.14 0155386
@antirez Fixed typo in the 2.4.14 release note. 81b89a5
Commits on Jun 02, 2012
@antirez Jemalloc updated to 3.0.0.
Full changelog here:;a=blob_plain;f=ChangeLog;hb=master

Notable improvements from the point of view of Redis:

1) Bugfixing.
2) Support for Valgrind.
3) Support for OSX Lion, FreeBSD.
@antirez Deleted jemalloc.orig from /deps.
In the commit upgrading jemalloc to version 3.0.0 I added the old
version of Jemalloc in the 'jemalloc.orig' directory for an error.
This commit removes the not useful version of jemalloc.
@anydot anydot future-proof version comparison ba712ce
@antirez Added time.h include in redis-cli.
redis-cli.c uses the time() function to seed the PRNG, but time.h was
not included. This was not noticed since sys/time.h is included and was
enough in most systems (but not correct). With Ubuntu 12.04 GCC
generates a warning that made us aware of the issue.
Commits on Jun 21, 2012
@antirez Redis 2.4.15 a328c73
Commits on Jul 09, 2012
@antirez REPLCONF internal command introduced.
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

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

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

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.
@antirez Typo in comment. 0332a32
@jokea jokea mark fd as writable when EPOLLERR or EPOLLHUP is returned by epoll_wait. 95bf36f
Commits on Aug 01, 2012
@antirez Redis 2.4.16 2a18c2c
Commits on Aug 22, 2012
@pietern pietern Set p to its new offset before modifying it 7de2f7e
@mgp mgp Use correct variable name for value to convert.
Note by @antirez: this code was never compiled because utils.c lacked the
float.h include, so we never noticed this variable was mispelled in the

This should provide a noticeable speed boost when saving certain types
of databases with many sorted sets inside.
Commits on Aug 30, 2012
@antirez run_id added to INFO output (backported from 2.6).
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.
@antirez Sentinel: Redis-side support for slave priority.
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

A next commit will add support in the Sentinel side as well.
@antirez Sentinel: added documentation about slave-priority in redis.conf 62c8fa3
@antirez Redis 2.4.17 03a851e
Commits on Sep 11, 2012
@antirez Make sure that SELECT argument is an integer or return an error.
Unfortunately we had still the lame atoi() without any error checking in
place, so "SELECT foo" would work as "SELECT 0". This was not an huge
problem per se but some people expected that DB can be strings and not
just numbers, and without errors you get the feeling that they can be
numbers, but not the behavior.

Now getLongFromObjectOrReply() is used as almost everybody else across
the code, generating an error if the number is not an integer or
overflows the long type.

Thanks to @mipearson for reporting that on Twitter.
Commits on Nov 28, 2012
@antirez Jemalloc updated to version 3.2.0. b85cb4c
@antirez Redis 2.4.18 545a0b4