summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Redis 2.8.10.2.8.10antirez2014-06-052-1/+25
|
* Don't process min-slaves-to-write for slaves.antirez2014-06-051-1/+2
| | | | | | | Replication is totally broken when a slave has this option, since it stops accepting updates from masters. This fixes issue #1434.
* Tests for min-slaves-* feature.antirez2014-06-051-0/+60
|
* Fixed dbuf variable scope in luaRedisGenericCommand().antirez2014-06-041-1/+1
| | | | | | | I'm not sure if while the visibility is the inner block, the fact we point to 'dbuf' is a problem or not, probably the stack var isx guaranteed to live until the function returns. However obvious code is better anyway.
* Regression test for issue #1118.antirez2014-06-041-0/+8
|
* Scripting: better Lua number -> string conversion in luaRedisGenericCommand().antirez2014-06-041-4/+14
| | | | | | | | | | | | | | The lua_to*string() family of functions use a non optimal format specifier when converting integers to strings. This has both the problem of the number being converted in exponential notation, which we don't use as a Redis return value when floating point numbers are involed, and, moreover, there is a loss of precision since the default format specifier is not able to represent numbers that must be represented exactly in the IEEE 754 number mantissa. The new code handles it as a special case using a saner conversion. This fixes issue #1118.
* More trailing spaces in sentinel.c removed.antirez2014-05-281-2/+2
|
* Disable recursive watchdog signal handlerMatt Stancliff2014-05-261-1/+1
| | | | | | | | If we are in the signal handler, we don't want to handle the signal again. In extreme cases, this can cause a stack overflow and segfault Redis. Fixes #1771
* Sentinel example config: explain you don't need to specify slaves.antirez2014-05-261-0/+6
|
* Test: fixed scripting.tcl test false positive.antirez2014-05-221-0/+1
|
* Process events with processEventsWhileBlocked() when blocked.antirez2014-05-225-4/+27
| | | | | | | | 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).
* Accept multiple clients per iteration.antirez2014-05-222-17/+33
| | | | | | | | | | | | | | 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.
* While ANET_ERR is -1, check syscall retval for -1 itself.antirez2014-05-221-2/+2
|
* Regression test for issue #1764.antirez2014-05-201-0/+13
|
* Fix LUA_OBJCACHE segfault.michael-grunder2014-05-201-1/+3
| | | | | | | | | | When scanning the argument list inside of a redis.call() invocation for pre-cached values, there was no check being done that the argument we were on was in fact within the bounds of the cache size. So if a redis.call() command was ever executed with more than 32 arguments (current cache size #define setting) redis-server could segfault.
* Remove trailing spaces from scripting.cantirez2014-05-201-3/+3
|
* Remove trailing spaces from sentinel.c.antirez2014-05-201-9/+9
|
* HyperLogLog regression test for issue #1762.antirez2014-05-191-0/+11
|
* Correct the HyperLogLog stale cache flag to prevent unnecessary computations.Mike Trinkala2014-05-191-4/+4
| | | | Set the MSB as documented.
* Fix 2.8 backport of fastscript branch.antirez2014-05-141-2/+1
| | | | No REDIS_ENCODING_EMBSTR in 2.8 internals.
* Fixed possible buffer overflow bug if RDB file is corrupted.Akos Vandra2014-05-121-1/+1
| | | | (Note: commit message modified by @antirez for clarity).
* fixed possible buffer overflow errorAkos Vandra2014-05-121-1/+1
|
* Sentinel: Add "dir /tmp" directive in example sentinel.conf.antirez2014-05-121-0/+7
|
* DEBUG POPULATE: call dictExpand() to avoid useless rehashing.antirez2014-05-091-0/+1
|
* Sentinel: log when a failover will be attempted again.antirez2014-05-081-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | When a Sentinel performs a failover (successful or not), or when a Sentinel votes for a different Sentinel trying to start a failover, it sets a min delay before it will try to get elected for a failover. While not strictly needed, because if multiple Sentinels will try to failover the same master at the same time, only one configuration will eventually win, this serialization is practically very useful. Normal failovers are cleaner: one Sentinel starts to failover, the others update their config when the Sentinel performing the failover is able to get the selected slave to move from the role of slave to the one of master. However currently this timeout was implicit, so users could see Sentinels not reacting, after a failed failover, for some time, without giving any feedback in the logs to the poor sysadmin waiting for clues. This commit makes Sentinels more verbose about the delay: when a master is down and a failover attempt is not performed because the delay has still not elaped, something like that will be logged: Next failover delay: I will not start a failover before Thu May 8 16:48:59 2014
* Sentinel: generate +config-update-from event when a new config is received.antirez2014-05-081-0/+1
| | | | | This event makes clear, before the switch-master event is generated, that a Sentinel received a configuration update from another Sentinel.
* Scripting test: check that Lua can call commands rewirting argv.antirez2014-05-071-1/+14
| | | | | | | | | | SPOP, tested in the new test, is among the commands rewritng the client->argv argument vector (it gets rewritten as SREM) for command replication purposes. Because of recent optimizations to client->argv caching in the context of the Lua internal Redis client, it is important to test for SPOP to be callable from Lua without bad effects to the other commands.
* Test: handle new osx 'leaks' error.antirez2014-05-071-1/+2
| | | | | | Sometimes the process is still there but no longer in a state that can be checked (after being killed). This used to happen after a call to SHUTDOWN NOSAVE in the scripting unit, causing a false positive.
* Scripting: objects caching for Lua c->argv creation.antirez2014-05-071-3/+40
| | | | | | Reusing small objects when possible is a major speedup under certain conditions, since it is able to avoid the malloc/free pattern that otherwise is performed for every argument in the client command vector.
* Scripting: Use faster API for Lua client c->argv creation.antirez2014-05-071-3/+6
| | | | | | | Replace the three calls to Lua API lua_tostring, lua_lua_strlen, and lua_isstring, with a single call to lua_tolstring. ~ 5% consistent speed gain measured.
* Scripting: don't call lua_gc() after Lua script run.antirez2014-05-071-1/+17
| | | | | | | | Calling lua_gc() after every script execution is too expensive, and apparently does not make the execution smoother: the same peak latency was measured before and after the commit. This change accounts for scripts execution speedup in the order of 10%.
* Scripting: cache argv in luaRedisGenericCommand().antirez2014-05-071-4/+15
| | | | ~ 4% consistently measured speed improvement.
* Fixed missing c->bufpos reset in luaRedisGenericCommand().antirez2014-05-071-0/+1
| | | | | Bug introduced when adding a fast path to avoid copying the reply buffer for small replies that fit into the client static buffer.
* Scripting: replace tolower() with faster code in evalGenericCommand().antirez2014-05-071-1/+5
| | | | | | The function showed up consuming a non trivial amount of time in the profiler output. After this change benchmarking gives a 6% speed improvement that can be consistently measured.
* Scripting: luaRedisGenericCommand() fast path for buffer-only replies.antirez2014-05-071-7/+15
| | | | | | When the reply is only contained in the client static output buffer, use a fast path avoiding the dynamic allocation of an SDS string to concatenate the client reply objects.
* Define HAVE_ATOMIC for clang.antirez2014-05-071-1/+1
|
* Scripting: simpler reply buffer creation in luaRedisGenericCommand().antirez2014-05-071-5/+2
| | | | | It if faster to just create the string with a single sdsnewlen() call. If c->bufpos is zero, the call will simply be like sdsemtpy().
* Add test for deleting an expired keyMatt Stancliff2014-04-231-0/+8
| | | | | | | Verify proper expire-before-delete behavior. This test passes with the expire-before-delete commit and fails without it.
* Check key expiration before deletingMatt Stancliff2014-04-231-0/+1
| | | | | | Deleting an expired key should return 0, not success. Fixes #1648
* fix null pointer access with no file pointerGlauber Costa2014-04-231-1/+1
| | | | | | I happen to be working on a system that lacks urandom. While the code does try to handle this case and artificially create some bytes if the file pointer is empty, it does try to close it unconditionally, leading to a segfault.
* Merge pull request #1700 from nirvdrum/patch-1Salvatore Sanfilippo2014-04-231-2/+2
|\ | | | | Fixed typos.
| * Fixed typos.Kevin Menard2014-04-221-2/+2
| |
* | Missing return REDIS_ERR added to processMultibulkBuffer().antirez2014-04-231-1/+3
|/ | | | | | | 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.
* redis-cli help.h updated.antirez2014-04-221-2/+73
|
* generate-command-help.rb updated with new hyperloglog group.antirez2014-04-221-1/+2
|
* Redis 2.8.9.2.8.9antirez2014-04-222-1/+11
|
* Fuzzy test for ZREMRANGEBYLEX added.antirez2014-04-181-1/+41
|
* ZREMRANGEBYLEX memory leak removed calling zslFreeLexRange().antirez2014-04-181-2/+5
|
* PFCOUNT multi-key test added.antirez2014-04-181-0/+15
|
* Speedup hllRawSum() processing 8 bytes per iteration.antirez2014-04-181-7/+15
| | | | | | | | | | The internal HLL raw encoding used by PFCOUNT when merging multiple keys is aligned to 8 bits (1 byte per register) so we can exploit this to improve performances by processing multiple bytes per iteration. In benchmarks the new code was several times faster with HLLs with many registers set to zero, while no slowdown was observed with populated HLLs.