Commit Graph

4727 Commits

Author SHA1 Message Date
e6ac6a170b Cluster test: test that writes are retained during failovers.
In the test we use WAIT when the master and slave are up, and only later the
partition is created killing the master, so we are sure we don't incur
in failure modes that may lose writes in this test: the goal here is to
make sure that the elected slave was replicating correctly with the
master.
2014-07-23 09:41:01 +02:00
d080eea03d Test: Pub/Sub PING. 2014-07-18 12:20:56 +02:00
e236199be8 Test: small integer sharing depends on maxmemory policy. 2014-07-18 12:20:56 +02:00
29e1c431bd PING: backward compatible error for wrong number of args. 2014-07-18 12:20:56 +02:00
2570eeb711 tryObjectEncoding(): use shared objects with maxmemory and non-LRU policy.
In order to make sure every object has its own private LRU counter, when
maxmemory is enabled tryObjectEncoding() does not use the pool of shared
integers. However when the policy is not LRU-based, it does not make
sense to do so, and it is much better to save memory using shared
integers.
2014-07-18 12:20:56 +02:00
2264b9816c Variadic PING with support for Pub/Sub.
PING can now be called with an additional arugment, behaving exactly
like the ECHO command. PING can now also be called in Pub/Sub mode (with
one more more subscriptions to channels / patterns) in order to trigger
the delivery of an asynchronous pong message with the optional payload.

This fixes issue #420.
2014-07-18 12:20:56 +02:00
23c1408963 PubSub clients refactoring and new PUBSUB flag.
The code tested many times if a client had active Pub/Sub subscriptions
by checking the length of a list and dictionary where the patterns and
channels are stored. This was substituted with a client flag called
REDIS_PUBSUB that is simpler to test for. Moreover in order to manage
this flag some code was refactored.

This commit is believed to have no effects in the behavior of the
server.
2014-07-18 12:20:56 +02:00
63f6351858 RDB: load string objects directly as EMBSTR objects when possible. 2014-07-18 12:20:56 +02:00
d75fc09354 Fix OBJECT arity
Previously, the command definition for the OBJECT command specified
a minimum of two args (and that it was variadic), which meant that
if you sent this:

OBJECT foo

When cluster was enabled, it would result in an assertion/SEGFAULT
when Redis was attempting to extract keys.

It appears that OBJECT is not variadic, and only ever takes 3 args.

https://gist.github.com/michael-grunder/25960ce1508396d0d36a
2014-07-18 12:20:56 +02:00
a16feb99f2 Fix typo in LATENCY DOCTOR output. 2014-07-18 12:20:56 +02:00
639674b309 Test: more reliable AOF rewrite test under write load. 2014-07-18 12:20:56 +02:00
0e22e4ae91 LATENCY command / monitor basic tests. 2014-07-18 12:20:56 +02:00
034f39f14d LATENCY HISTORY returns empty array if no data is available.
Previously we returned an error.
2014-07-18 12:20:56 +02:00
ef7c1fbcef Test: enable latency monitor in the default config.
This way as a side effect of running the test we also stress the latency
monitor data collection.
2014-07-18 12:20:56 +02:00
93c6ea6c6f Test: AOF rewrite during write load. 2014-07-18 12:20:56 +02:00
959667ffe1 Fixed a few missing newline in createLatencyReport(). 2014-07-18 12:20:56 +02:00
c9ddd141dd createLatencyReport(): compile before commit avoids commits. 2014-07-18 12:20:56 +02:00
1b6d614f2c createLatencyReport(), fix mount option name. 2014-07-18 12:20:56 +02:00
44de3a9cfb createLatencyReport(): initialize all advices to zero. 2014-07-18 12:20:56 +02:00
a117fd2a44 LATENCY DOCTOR first implementation complete. 2014-07-18 12:20:56 +02:00
31e1e30aa6 Fix analyzeLatencyForEvent() MAD computation. 2014-07-18 12:20:56 +02:00
9ed02e137c LATENCY DOCTOR: initial draft and events summary output. 2014-07-18 12:20:56 +02:00
c7f1aa74d7 Latency: low level time series analysis implemented. 2014-07-18 12:20:56 +02:00
9a037792b6 LATENCY SAMPLES renamed LATENCY HISTORY. 2014-07-18 12:20:56 +02:00
7c6a028a3a LATENCY RESET implemented. 2014-07-18 12:20:56 +02:00
cc7b10cb52 Better "final read from parent" algorithm in rewriteAppendOnlyFile*(.
We now wait up to 1 second for diff data to come from the parent,
however we use poll(2) to wait for more data, and use a counter of
contiguous failures to get data for N times (set to 20 experimentally
after different tests) as an early stop condition to avoid wasting 1
second when the write traffic is too low.
2014-07-18 12:20:56 +02:00
d721e6e5c3 Log AOF diff sizes in MBs instead of bytes. 2014-07-18 12:20:56 +02:00
e615539cc7 aofChildWriteDiffData() better handling of free blocks. 2014-07-18 12:20:55 +02:00
f0a58bfaba redis-benchmark: abort when all clients are disconnected. 2014-07-18 12:20:55 +02:00
d3514edd3e Fine tuning of aofReadDiffFromParent() calls trigger. 2014-07-18 12:20:55 +02:00
180c9143b9 Use amount of I/O not ops to trigger aofReadDiffFromParent(). 2014-07-18 12:20:55 +02:00
e05cd36326 aofChildWriteDiffData(): write as much as possible. 2014-07-18 12:20:55 +02:00
9494c84523 Handle write failure in AOF parent -> child ACK. 2014-07-18 12:20:55 +02:00
896256210f Use a timeout when reading parent ack from AOF child. 2014-07-18 12:20:55 +02:00
576056d973 Send AOF diffs from parent to child to improve latency. 2014-07-18 12:20:55 +02:00
ca2db2bcb9 Use fsync instead of aof_fsync in final AOF sync.
This happens in the child process so we don't care about latency:
better to sync metadata as well.
2014-07-18 12:20:55 +02:00
74423be7a5 Fixed conditional for aof-write-pending-fsync latency event selection. 2014-07-18 12:20:55 +02:00
7989b612af Dependencies updated. 2014-07-18 12:20:55 +02:00
289e83f1c9 Cast void* to char* to avoid waring in latencyCommand(). 2014-07-18 12:20:55 +02:00
a7dc975a81 Properly initialize min/max in latency.c. 2014-07-18 12:20:55 +02:00
b2d6266521 latencyStartMonitor() modified to avoid warnings. 2014-07-18 12:20:55 +02:00
cd5c13e12f Latency monitor: specialize delayed aof writes events. 2014-07-18 12:20:55 +02:00
231e016235 LATENCY GRAPH: filling under the curve is more readable. 2014-07-18 12:20:55 +02:00
3bd6917b0d LATENCY GRAPH implemented. 2014-07-18 12:20:55 +02:00
6fb6609600 latencyTimeSeries structure max field type fixed. 2014-07-18 12:20:55 +02:00
9bc408493e Free labels in freeSparklineSequence(). 2014-07-18 12:20:55 +02:00
b58c960eb2 LATENCY LATEST: add the max field. 2014-07-18 12:20:55 +02:00
a9d9898680 Latency monitor trheshold value is now configurable.
This commit adds both support for redis.conf and CONFIG SET/GET.
2014-07-18 12:20:55 +02:00
b71a980687 ASCII sparklines generation API. 2014-07-18 12:20:55 +02:00
e817f6c013 License added to latency.h. 2014-07-18 12:20:55 +02:00