Commit Graph

5353 Commits

Author SHA1 Message Date
antirez 3f38b51ad7 Jemalloc configure script fixed to work nested.
Now way to make unmodified Jemalloc configure to work when the jemalloc
source tree is inside a subdirectory of a different git repository.

Problem signaled here:
http://www.canonware.com/pipermail/jemalloc-discuss/2015-October/001174.html
2015-10-07 09:17:06 +02:00
antirez a9951b1b6a Jemalloc updated to 4.0.3. 2015-10-06 16:55:37 +02:00
antirez e3ded0273c Added a README into deps on dependencies and how to upgrade. 2015-10-06 10:56:16 +02:00
antirez ceaf58dfd5 Regression test for GEORADIUS COUNT arity check. 2015-10-06 09:27:29 +02:00
antirez 319d180136 Fix GEORADIUS COUNT option arity checks. 2015-10-06 09:25:28 +02:00
antirez 19f6ab50c3 Lazyfree options documented in the example redis.conf. 2015-10-05 12:24:16 +02:00
antirez 880c606a7c Lazyfree options implemented in the configuration. 2015-10-05 12:11:27 +02:00
antirez 252cfa0a39 Lazyfree: cond vars to enabled/disable it based on DEL context. 2015-10-02 15:27:57 +02:00
antirez 5359696796 Fixed a bug in the emptyDb() new implementation. 2015-10-01 13:02:26 +02:00
antirez ecdbc333a3 FLUSHDB and FLUSHALL ASYNC option implemented. 2015-10-01 13:02:26 +02:00
antirez 1f26a9468f Lazyfree: pending objects count in INFO output. 2015-10-01 13:02:26 +02:00
antirez c69c6c80fb Lazyfree: ability to free whole DBs in background. 2015-10-01 13:02:26 +02:00
antirez b08c36c5f2 Lazyfree: keep count of objects to free. 2015-10-01 13:02:25 +02:00
antirez c7b46a4719 zmalloc.c converted to use atomicvar.h. 2015-10-01 13:02:25 +02:00
antirez 7e5d69019e Atomic vars implemented in a more general way.
We have them into zmalloc.c, but this is going to replace that
implementation, so that it's possible to use the same idea everywhere
inside the code base.
2015-10-01 13:02:25 +02:00
antirez 7af4eeb745 Lazyfree: incremental removed, only threaded survived. 2015-10-01 13:02:25 +02:00
antirez 9253d85073 Threaded lazyfree WIP #1. 2015-10-01 13:02:25 +02:00
antirez 4d50d691e3 bio.c: new API bioWaitStepOfType(). 2015-10-01 13:02:25 +02:00
antirez 5b850d7a09 Test: stack_logging var should be initialized to 0. 2015-10-01 13:02:25 +02:00
antirez 1dab60df81 Hash new implementation memleaks fixed. 2015-10-01 13:02:25 +02:00
antirez 97ba4e3886 Lazyfree: Hash converted to use plain SDS WIP 5. 2015-10-01 13:02:25 +02:00
antirez 36be34bb87 Test: support for stack logging for OSX malloc/leaks. 2015-10-01 13:02:25 +02:00
antirez 974514b936 Lazyfree: Hash converted to use plain SDS WIP 4. 2015-10-01 13:02:25 +02:00
antirez 4a18352877 Lazyfree: Hash converted to use plain SDS WIP 3. 2015-10-01 13:02:24 +02:00
antirez 777396aeba Lazyfree: Hash converted to use plain SDS WIP 2. 2015-10-01 13:02:24 +02:00
antirez 1c247556c6 Lazyfree: Hash converted to use plain SDS WIP 1. 2015-10-01 13:02:24 +02:00
antirez afc4b9241c DEBUG DIGEST Set type memory leak fixed. 2015-10-01 13:02:24 +02:00
antirez 34e489cb8c SORT memory leak fixed. 2015-10-01 13:02:24 +02:00
antirez a7c5be18a8 Lazyfree: Sorted sets convereted to plain SDS. (several commits squashed) 2015-10-01 13:02:24 +02:00
antirez 86d48efbfd Lazyfree: Convert Sets to use plains SDS (several commits squashed). 2015-10-01 13:02:24 +02:00
antirez 4ff3c17a20 Lazyfree: client output buffers no longer use Redis Objects. 2015-10-01 13:02:24 +02:00
antirez 0c05436cef Lazyfree: a first implementation of non blocking DEL. 2015-10-01 13:00:19 +02:00
antirez 712ea7296d Call writeToClient() directly instead of the write handler. 2015-09-30 17:41:52 +02:00
antirez 01c08b5089 Fix processEventsWhileBlocked() to handle PENDING_WRITE clients.
After the introduction of the list with clients with pending writes, to
process clients incrementally outside of the event loop we also need to
process the pending writes list.
2015-09-30 17:23:44 +02:00
antirez 1e7153831d Refactoring: unlinkClient() added to lower freeClient() complexity. 2015-09-30 17:10:03 +02:00
antirez fdb3be939e Refactoring: new function to test if client has pending output. 2015-09-30 16:41:48 +02:00
antirez 825f65d2bd Reverse list of clients with pending writes.
May potentially improve locality... not exactly clear if this makes a
difference or not. But for sure is harmless.
2015-09-30 16:29:42 +02:00
antirez 063ecbd5e5 writeToClient(): don't remove write handler if not needed. 2015-09-30 16:29:42 +02:00
antirez b741a90ce9 handleClientsWithPendingWrites(): detect dead clients. 2015-09-30 16:29:42 +02:00
antirez 481a0db315 Move handleClientsWithPendingWrites() in networking.c. 2015-09-30 16:29:42 +02:00
antirez 1c7d87df0c Avoid installing the client write handler when possible. 2015-09-30 16:29:41 +02:00
antirez d1b6a17d1e redis-cli pipe mode: don't stay in the write loop forever.
The code was broken and resulted in redis-cli --pipe to, most of the
times, writing everything received in the standard input to the Redis
connection socket without ever reading back the replies, until all the
content to write was written.

This means that Redis had to accumulate all the output in the output
buffers of the client, consuming a lot of memory.

Fixed thanks to the original report of anomalies in the behavior
provided by Twitter user @fsaintjacques.
2015-09-30 16:24:21 +02:00
antirez 622366aa74 Mark version of unstable branch in an unique way. 2015-09-29 17:30:24 +02:00
antirez 846da5b22e Test: fix false positive in HSTRLEN test.
HINCRBY* tests later used the value "tmp" that was sometimes generated
by the random key generation function. The result was ovewriting what
Tcl expected to be inside Redis with another value, causing the next
HSTRLEN test to fail.
2015-09-15 09:37:30 +02:00
antirez 3c23b5ffd0 GEORADIUS: Don't report duplicates when radius is huge.
Georadius works by computing the center + neighbors squares covering all
the area of the specified position and radius. Then a distance filter is
used to remove elements which are actually outside the range.

When a huge radius is used, like 5000 km or more, adjacent neighbors may
collide and be the same, leading to the reporting of the same element
multiple times. This only happens in the edge case of huge radius but is
not ideal.

A robust but slow solution would involve qsorting the range to remove
all the duplicates. However since the collisions are only in adjacent
boxes, for the way they are ordered in the code, it is much faster to
just check if the current box is the same as the previous one processed.

This commit adds a regression test for the bug.

Fixes #2767.
2015-09-14 23:10:50 +02:00
antirez 0a91fc459f Test: MOVE expire test improved.
Related to #2765.
2015-09-14 12:35:55 +02:00
antirez 4fec5ee165 MOVE re-add TTL check fixed.
getExpire() returns -1 when no expire exists.

Related to #2765.
2015-09-14 12:34:17 +02:00
antirez f529a01c1b MOVE now can move TTL metadata as well.
MOVE was not able to move the TTL: when a key was moved into a different
database number, it became persistent like if PERSIST was used.

In some incredible way (I guess almost nobody uses Redis MOVE) this bug
remained unnoticed inside Redis internals for many years.
Finally Andy Grunwald discovered it and opened an issue.

This commit fixes the bug and adds a regression test.

Close #2765.
2015-09-14 12:30:00 +02:00
antirez 33769f840c Sentinel: command arity check added where missing. 2015-09-08 09:27:43 +02:00
Salvatore Sanfilippo 0c62d95538 Merge pull request #2695 from rogerlz/unstable
redis-sentinel crash if ckquorum command is executed without args
2015-09-08 09:24:45 +02:00