4984 Commits

Author SHA1 Message Date
antirez
49f11f2e78 SPOP replication tests. 2015-02-11 10:45:01 +01:00
antirez
616bca993e SPOP explicit tests for the three different code paths. 2015-02-11 10:12:00 +01:00
antirez
dc10245f07 SPOP with count: fix replication for code path #3. 2015-02-11 10:11:28 +01:00
antirez
83a8739e42 SPOP: reimplemented for speed and better distribution.
The old version of SPOP with "count" argument used an API call of dict.c
which was actually designed for a different goal, and was not capable of
good distribution. We follow a different three-cases approach optimized
for different ratiion between sets and requested number of elements.

The implementation is simpler and allowed the removal of a large amount
of code.
2015-02-11 09:36:09 +01:00
antirez
21ab1427da alsoPropagate: handle REDIS_CALL_PROPAGATE and AOF loading. 2015-02-09 23:57:52 +01:00
antirez
54c27e079a Change alsoPropagate() behavior to make it more usable.
Now the API automatically creates its argv copy and increment ref count
of passed objects.
2015-02-09 23:44:42 +01:00
antirez
359113cc22 SPOP with count: initial fixes to the implementation.
Severan problems are addressed but still a few missing.
Since replication of this command was more complex than others since it
needs to replicate multiple SREM commands, an old API able to do this
was reused (it was taken inside the implementation since it was pretty
obvious soon or later that would be useful). The API was improved a bit
so that now a command may opt-out for the standard command replication
when the server.dirty counter is incremented, in order to "manually"
replicate what it wants.
2015-02-09 22:49:32 +01:00
antirez
56a21d2ae8 Separate latency monitoring of eviction loop and eviction DELs. 2015-02-09 15:28:22 +01:00
antirez
d275a942f8 dict.c: reset emptylen when bucket is not empty.
Fixed by @oranagra, thank you.
2015-02-08 23:08:22 +01:00
antirez
9a28ead0a1 dict.c Rehashing visualization code snippet added to utils. 2015-02-08 23:08:22 +01:00
antirez
aea23a487b redis-cli --stat: show LOAD when loading. 2015-02-08 23:08:22 +01:00
antirez
3bcbdfd348 Remove optional single-key path from evictionPoolPopulate(). 2015-02-08 23:08:22 +01:00
antirez
4038bbe225 dict.c: add dictGetSomeKeys(), specialized for eviction. 2015-02-08 23:08:22 +01:00
antirez
b872594ee1 dict.c: avoid code repetition in dictRehash().
Avoid code repetition introduced with PR #2367, also fixes the return
value to always return 0 if there is nothing more to rehash.
2015-02-08 23:08:22 +01:00
Sun He
7ddbfd1219 dict.c/dictRehash: check again to update 2015-02-08 23:08:22 +01:00
antirez
17fa6b087d dict.c: don't try buckets that are empty for sure in dictGetRandomKey().
This is very similar to the optimization applied to dictGetRandomKeys,
but applied to the single key variant.

Related to issue #2306.
2015-02-08 23:08:22 +01:00
antirez
b98c33db80 dict.c: dictGetRandomKeys() optimization for big->small table case.
Related to issue #2306.
2015-02-08 23:08:21 +01:00
antirez
e004ac8fe8 dict.c: dictGetRandomKeys() visit pattern optimization.
We use the invariant that the original table ht[0] is never populated up
to the index before the current rehashing index.

Related to issue #2306.
2015-02-08 23:08:21 +01:00
antirez
63f8bb621d dict.c: put a bound to max work dictRehash() call can do.
Related to issue #2306.
2015-02-08 23:08:21 +01:00
antirez
7e5031ea18 dict.c: prevent useless resize to same size.
Related to issue #2306.
2015-02-08 23:08:21 +01:00
antirez
6bda18ff1e Less blocking dictGetRandomKeys().
Related to issue #2306.
2015-02-08 23:08:21 +01:00
antirez
cfe21852e7 redis-cli --latecy-dist reverted to gray scale.
So far not able to find a color palette within the 256 colors which is
not confusing. However I believe it is a possible task, so will try
better later.
2015-02-08 17:39:42 +01:00
antirez
2723412b7b redis-cli --latency-dist now uses a color palette.
Still not happy with the result but low grays are hard to see in certain
monitors with a non perfect gamma.
2015-02-07 20:15:40 +01:00
antirez
ace1acc532 redis-cli latency dist: add new top HL. 2015-02-07 18:06:14 +01:00
antirez
414df143f5 Add missing latency-dest legend symbol. 2015-02-07 15:05:40 +01:00
antirez
2860cf4139 Initial implementation of redis-cli --latency-dist. 2015-02-07 15:00:38 +01:00
antirez
2ac7b5a8b4 Fix RDB corruption test after server behavior change. 2015-02-04 11:53:19 +01:00
antirez
78dd2b313e Merge branch 'unstable' of github.com:/antirez/redis into unstable 2015-02-04 11:26:31 +01:00
antirez
c5dd686ecb Replication: put server.master client creation into separated function. 2015-02-04 11:26:20 +01:00
antirez
719c6c2b96 Suppress sign warning in sort.c.
Related to #2346.
2015-02-03 15:42:56 +01:00
antirez
96abf65900 Hopefully better sort.c optimization comments.
Related to #2346.
2015-02-03 15:38:21 +01:00
Salvatore Sanfilippo
5fbb36f9e7 Merge pull request #2346 from sunheehnus/sort
Little optimization & bug fix in sort.c
2015-02-03 15:32:38 +01:00
antirez
1dbd8e94a7 More obvious indentation in setCommand(). 2015-02-03 14:17:06 +01:00
antirez
51010007bc Merge branch 'unstable' of git://github.com/mihirvj/redis into set-pr 2015-02-03 14:13:30 +01:00
antirez
fad758b322 Check RDB automatically in a few more cases. 2015-02-03 10:33:05 +01:00
antirez
7d1e158084 Handle redis-check-rdb as a standalone program.
This also makes it backward compatible in the usage, but for the command
name. However the old command name was less obvious so it is worth to
break it probably.

With the new setup the program main can perform argument parsing and
everything else useful for an RDB check regardless of the Redis server
itself.
2015-02-03 10:25:01 +01:00
antirez
45102a6f63 Norrow backtrace and setproctitle() to Linux+glibc.
Backtrace is a glibc extension, while setproctitle() implementation
depends on the memory layout and is partially libc dependent.
2015-02-03 10:09:21 +01:00
antirez
128c642d05 Ignore config.sh inside create-cluster script dir. 2015-02-03 09:34:20 +01:00
Salvatore Sanfilippo
cdc0e9bfb5 Merge pull request #2318 from mattcollier/patch-1
Fix redis-cli CSV NIL output
2015-02-02 22:47:57 +01:00
Sun He
c908774b9e sort.c: REDIS_LIST's dontsort optimization
also fix the situation "dontsort DESC" of a list
2015-02-02 11:29:20 +08:00
antirez
6502947a85 redis-check-rdb: initialize entry in case while is never entered. 2015-01-30 15:19:39 +01:00
antirez
79fa67cdb8 Cluster: Tcl script to check avg pfail->fail time. 2015-01-30 12:03:17 +01:00
antirez
233729fe7f Cluster: some bias towwards FAIL/PFAIL nodes in gossip sections.
This improves PFAIL -> FAIL switch. Too late at this point in the RC
releases to add proper PFAIL/FAIL separate dictionary to do this in a
less randomized way. Tested in practice with experiments that this
helps. PFAIL -> FAIL average with 20 nodes and node-timeout set to 5
seconds takes 2.5 seconds without this commit, 1 second with this
commit.
2015-01-30 11:55:36 +01:00
antirez
69b4f00d28 More correct wanted / maxiterations values in clusterSendPing(). 2015-01-30 11:23:27 +01:00
antirez
6b1c6334be Cluster: create-cluster script improved. 2015-01-30 10:41:45 +01:00
antirez
e5a22064cc Cluster: magical 10% of nodes explained in comments. 2015-01-29 15:43:35 +01:00
antirez
1efacfe53d CLUSTER count-failure-reports command added. 2015-01-29 15:02:10 +01:00
antirez
3fd43062c8 Cluster: use a number of gossip sections proportional to cluster size.
Otherwise it is impossible to receive the majority of failure reports in
the node_timeout*2 window in larger clusters.

Still with a 200 nodes cluster, 20 gossip sections are a very reasonable
amount of bytes to send.

A side effect of this change is also fater cluster nodes joins for large
clusters, because the cluster layout makes less time to propagate.
2015-01-29 14:20:59 +01:00
antirez
d59ad97d76 create-cluster script: sane default timeout. 2015-01-29 13:21:42 +01:00
antirez
69583be181 Ignore redis-check-rdb after the name switch. 2015-01-28 23:28:27 +01:00