summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Regression test for issue #2175.issue_2175antirez2014-12-031-0/+10
|
* Handle infinite explicitly in createStringObjectFromLongLong().antirez2014-12-031-8/+20
|
* Use exp format and more precision output for ZSCAN.antirez2014-12-025-15/+21
| | | | Ref: issue #2175
* Over 80 chars comment trimmed in pfcountCommand().antirez2014-12-021-1/+1
|
* Mark PFCOUNT as read-only, even if not true.antirez2014-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | PFCOUNT is technically speaking a write command, since the cached value of the HLL is exposed in the data structure (design error, mea culpa), and can be modified by PFCOUNT. However if we flag PFCOUNT as "w", read only slaves can't execute the command, which is a problem since there are environments where slaves are used to scale PFCOUNT reads. Nor it is possible to just prevent PFCOUNT to modify the data structure in slaves, since without the cache we lose too much efficiency. So while this commit allows slaves to create a temporary inconsistency (the strings representing the HLLs in the master and slave can be different in certain moments) it is actually harmless. In the long run this should be probably fixed by turning the HLL into a more opaque representation, for example by storing the cached value in the part of the string which is not exposed (this should be possible with SDS strings).
* Mark diskless replication as experimental in redis.conf.antirez2014-12-021-0/+4
|
* Test: wait for actual startup in start_server.antirez2014-11-281-0/+6
| | | | | | | | | start_server now uses return value from Tcl exec to get the server pid, however this introduces errors that depend from timing: a lot of the testing code base assumed the server to be actually up and running when server_start returns. So the old code that waits to see the pid in the log file was restored.
* Test: try to cleanup still running Redis instances on exit.antirez2014-11-282-9/+27
| | | | | It's hard to run the Redis test continuously if it leaks processes on exceptions / errors.
* Test framework: exit on timeout with report.antirez2014-11-281-18/+35
| | | | | There was no sane way to detect tests that may never end because of Redis bugs or tests bugs.
* Cluster PUBLISH message: fix totlen count.antirez2014-11-282-3/+7
| | | | | | bulk_data field size was not removed from the count. It is not possible to declare it simply as 'char bulk_data[]' since the structure is nested into another structure.
* redis-benchmark: default num of requests is now 100000.antirez2014-11-281-2/+2
| | | | | 10000 completes in a too short time and may easily provide unreliable figures because of tiny duration.
* Merge pull request #2169 from razzle/unstableSalvatore Sanfilippo2014-11-281-1/+1
|\ | | | | fix benchmark memleak in loop mode
| * fix benchmark memleak in loop modeMatthias Petschick2014-11-281-1/+1
|/
* Fix DEBUG OBJECT lru field to report seconds.antirez2014-11-261-1/+1
| | | | | | | | Because of (not so) recent Redis changes, now the LRU internally reported unit is milliseconds, not seconds, but the DEBUG OBJECT output was still claiming seconds while providing milliseconds. However OBJECT IDLETIME was working as expected, which is the correct API to use.
* Document redis-cli --stat in --help output.antirez2014-11-251-0/+1
|
* Merge remote-tracking branch 'origin/unstable' into unstableantirez2014-11-251-14/+32
|\
| * Merge pull request #2162 from ↵Salvatore Sanfilippo2014-11-241-14/+32
| |\ | | | | | | | | | | | | mattsta/fix/lua/cmsgpack/64-bit-integers-on-32-bit-platforms Fix lua-cmsgpack 64 bit integer on 32 bit platform
| | * Fix lua-cmsgpack 64 bit integer on 32 bit platformMatt Stancliff2014-11-241-14/+32
| |/ | | | | | | | | | | This syncs lua-cmsgpack with the mattsta/lua-cmsgpack upstream. Fixes #2161
* | Avoid valgrind memory leak false positive in processInlineBuffer().antirez2014-11-251-2/+4
|/ | | | | | | | | | | zmalloc(0) cauesd to actually trigger a non-zero allocation since with standard libc malloc we have our own zmalloc header for memory tracking, but at the same time the returned pointer is at the end of the block and not in the middle. This triggers a false positive when testing with valgrind. When the inline protocol args count is 0, we now avoid reallocating c->argv, preventing the issue to happen.
* Attempt to prevent false positives in replication test.antirez2014-11-241-11/+15
|
* lua_cjson.c Lua includes: angled -> quoted.antirez2014-11-141-2/+2
|
* Fix non-linux builds error introduced with THP checks.antirez2014-11-142-2/+2
|
* Merge remote-tracking branch 'origin/unstable' into unstableantirez2014-11-144-1/+212
|\
| * Merge pull request #1662 from mattsta/lua-add-bitopsSalvatore Sanfilippo2014-11-144-1/+212
| |\ | | | | | | Lua: Add bitop
| | * Lua: Add bitopMatt Stancliff2014-10-094-1/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few people have written custom C commands because bit manipulation isn't exposed through Lua. Let's give them Mike Pall's bitop. This adds bitop 1.0.2 (2012-05-08) from http://bitop.luajit.org/ bitop is imported as "bit" into the global namespace. New Lua commands: bit.tobit, bit.tohex, bit.bnot, bit.band, bit.bor, bit.bxor, bit.lshift, bit.rshift, bit.arshift, bit.rol, bit.ror, bit.bswap Verification of working (the asserts would abort on error, so (nil) is correct): 127.0.0.1:6379> eval "assert(bit.tobit(1) == 1); assert(bit.band(1) == 1); assert(bit.bxor(1,2) == 3); assert(bit.bor(1,2,4,8,16,32,64,128) == 255)" 0 (nil) 127.0.0.1:6379> eval 'assert(0x7fffffff == 2147483647, "broken hex literals"); assert(0xffffffff == -1 or 0xffffffff == 2^32-1, "broken hex literals"); assert(tostring(-1) == "-1", "broken tostring()"); assert(tostring(0xffffffff) == "-1" or tostring(0xffffffff) == "4294967295", "broken tostring()")' 0 (nil) Tests also integrated into the scripting tests and can be run with: ./runtest --single unit/scripting Tests are excerpted from `bittest.lua` included in the bitop distribution.
* | | Lua: add cmsgpack scripting testsMatt Stancliff2014-11-141-0/+52
| | | | | | | | | | | | | | | | | | | | | Basically: test to make sure we can load cmsgpack and do some sanity checks to make sure pack/unpack works properly. We also have a bonus test for circular encoding and decoding because I was curious how it worked.
* | | Lua: upgrade cmsgpack to 0.4.0Matt Stancliff2014-11-141-90/+305
| | | | | | | | | | | | | | | | | | | | | | | | Main reasons for upgrade: - Remove a warning when building Redis - Add multi pack/unpack - Improve memory usage and use Lua allocator properly - Fix some edge case encoding/decoding bugs
* | | Lua: remove new warning added by cjson headerMatt Stancliff2014-11-141-1/+1
| | | | | | | | | | | | | | | clang doesn't like "extern inline" when no definition is given right away.
* | | Lua: Use Redis solaris compatability for cjson tooMatt Stancliff2014-11-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cjson calls isinf, but some Solaris versions don't have isinf even with the attempted fix we have in deps/Makefile. We can harmlessly include the Redis solarisfixes.h header to give cjson proper isinf. Note: cjson has a compile-time setting for using their own defined isinf, but the Redis definition in solarisfixes.h is more complete. Fixes antirez#1620
* | | Lua: Upgrade cjson to 2.1.0 (2012-03-01)Matt Stancliff2014-11-147-310/+675
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new cjson has some improvements over our current version including increased platform compatability, a new resource limit to restrict decode depth, and better invalid number handling. One minor change was required to deps/Makefile because this version of cjson doesn't export itself globally, so we added a quick little define of -DENABLE_CJSON_GLOBAL. cjson now has an optional higher performing float parsing interface, but we are not including it (g_fmt.c, dtoa.c) because it requires endianness declaration during compile time. This commit is exactly lua_cjson.c from 2.1.0 with one minor change of altering the two Lua includes for local search instead of system-wide importing.
* | | Lua: add cjson scripting testMatt Stancliff2014-11-141-0/+17
|/ / | | | | | | | | Two simple decode tests added mainly to check that the 'cjson' global gets registered and is usable.
* | THP detection for LATENCY DOCTOR.antirez2014-11-121-2/+13
| |
* | Check THP support at startup and warn about it.antirez2014-11-122-2/+7
| |
* | THP detection / reporting functions added.antirez2014-11-123-6/+45
| |
* | Diskless SYNC: fix RDB EOF detection.antirez2014-11-113-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RDB EOF detection was relying on the final part of the RDB transfer to be a magic 40 bytes EOF marker. However as the slave is put online immediately, and because of sockets timeouts, the replication stream is actually contiguous with the RDB file. This means that to detect the EOF correctly we should either: 1) Scan all the stream searching for the mark. Sucks CPU-wise. 2) Start to send the replication stream only after an acknowledge. 3) Implement a proper chunked encoding. For now solution "2" was picked, so the master does not start to send ASAP the stream of commands in the case of diskless replication. We wait for the first REPLCONF ACK command from the slave, that certifies us that the slave correctly loaded the RDB file and is ready to get more data.
* | Disconnect timedout slave: regression introduced with diskless repl.antirez2014-11-111-2/+3
| |
* | Merge pull request #2096 from mattsta/cluster-ipv6Salvatore Sanfilippo2014-10-312-6/+8
|\ \ | | | | | | Enable Cluster IPv6 Support
| * | Parse cluster state file in IPv6 compatible wayMatt Stancliff2014-10-291-1/+1
| | | | | | | | | | | | We need to pick the port based on the _last_ colon, not the first one.
| * | Fix redis-trib.rb IP:Port disassembly for IPv6Matt Stancliff2014-10-291-5/+7
| | | | | | | | | | | | | | | | | | IP format is now any of: - 127.0.0.1:6379 - ::1:6379
* | | Merge pull request #2110 from mattsta/more-outbound-bind-fixesSalvatore Sanfilippo2014-10-312-3/+4
|\ \ \ | | | | | | | | Networking: add more outbound IP binding fixes
| * | | Networking: add more outbound IP binding fixesMatt Stancliff2014-10-292-3/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as the original bind fixes (we just missed these the first time around). This helps Redis not automatically send connections from the first IP on an interface if we are bound to a specific IP address (e.g. with multiple IP aliases on one interface, you want to send from _your_ IP, not from the first IP on the interface).
* | | Merge pull request #2078 from mattsta/hiredis-sigpipeSalvatore Sanfilippo2014-10-301-1/+4
|\ \ \ | |/ / |/| | Fix redis-cli from exiting after idle connection breaks
| * | redis-cli: ignore SIGPIPE network errorsMatt Stancliff2014-10-291-1/+4
|/ / | | | | | | Closes #2066
* | Merge branch 'memsync' into unstableantirez2014-10-2914-198/+965
|\ \
| * | Diskless replication: missing listRewind() added.memsyncantirez2014-10-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused BGSAVE to be triggered a second time without any need when we switch from socket to disk target via the command CONFIG SET repl-diskless-sync no and there is already a slave waiting for the BGSAVE to start. Also comments clarified about what is happening.
| * | Log slave ip:port in more log messages.antirez2014-10-271-6/+11
| | |
| * | Use new slave name function for diskless repl reporting.antirez2014-10-271-4/+4
| | |
| * | Added a function to get slave name for logs.antirez2014-10-273-15/+29
| | |
| * | Diskless replication: log BGSAVE delay only when it is non-zero.antirez2014-10-271-1/+2
| | |
| * | Document repl-diskless-sync-delay in redis.conf.antirez2014-10-271-0/+12
| | |