4765 Commits

Author SHA1 Message Date
antirez
255a6e32aa 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-18 17:13:46 +02:00
antirez
5926e0164e Test: Pub/Sub PING. 2014-07-18 12:03:31 +02:00
antirez
65cca8c9bb Test: small integer sharing depends on maxmemory policy. 2014-07-18 10:55:08 +02:00
antirez
9c3c11e4a7 PING: backward compatible error for wrong number of args. 2014-07-18 10:15:51 +02:00
antirez
f7b31f2cde 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 10:09:51 +02:00
antirez
c86a510c83 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-16 17:47:17 +02:00
antirez
518288bdaf 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-16 17:34:07 +02:00
antirez
fc21a596e6 RDB: load string objects directly as EMBSTR objects when possible. 2014-07-16 11:36:22 +02:00
Salvatore Sanfilippo
08d8fdcd63 Merge pull request #1870 from michael-grunder/object_arity
Fix OBJECT arity
2014-07-14 15:37:33 +02:00
michael-grunder
0b57f71c74 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-11 13:03:26 -07:00
antirez
68d6eb6a3f Fix typo in LATENCY DOCTOR output. 2014-07-11 10:57:28 +02:00
antirez
efe07ffa3a Test: more reliable AOF rewrite test under write load. 2014-07-10 16:42:43 +02:00
antirez
6f52d71a21 LATENCY command / monitor basic tests. 2014-07-10 16:23:54 +02:00
antirez
49903897ef LATENCY HISTORY returns empty array if no data is available.
Previously we returned an error.
2014-07-10 16:20:40 +02:00
antirez
186b5b0f66 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-10 15:04:34 +02:00
antirez
383536119d Test: AOF rewrite during write load. 2014-07-10 11:25:12 +02:00
antirez
a1f3072ab5 Fixed a few missing newline in createLatencyReport(). 2014-07-09 16:45:40 +02:00
antirez
cdc44eaf1a createLatencyReport(): compile before commit avoids commits. 2014-07-08 17:17:08 +02:00
antirez
8dfa279c19 createLatencyReport(), fix mount option name. 2014-07-08 17:12:21 +02:00
antirez
5102269c5a createLatencyReport(): initialize all advices to zero. 2014-07-08 17:11:56 +02:00
antirez
a519c133a6 LATENCY DOCTOR first implementation complete. 2014-07-08 17:05:56 +02:00
antirez
d1e9441165 Fix analyzeLatencyForEvent() MAD computation. 2014-07-08 12:56:45 +02:00
antirez
b65c20e3ea LATENCY DOCTOR: initial draft and events summary output. 2014-07-08 11:31:46 +02:00
antirez
608c0051d6 Latency: low level time series analysis implemented. 2014-07-07 15:00:01 +02:00
antirez
84018db59c LATENCY SAMPLES renamed LATENCY HISTORY. 2014-07-07 12:35:24 +02:00
antirez
9269ddff7c LATENCY RESET implemented. 2014-07-07 12:34:54 +02:00
antirez
378e020b71 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-05 15:42:24 +02:00
antirez
3d745b4919 Log AOF diff sizes in MBs instead of bytes. 2014-07-05 12:37:44 +02:00
antirez
8a89fd0b46 aofChildWriteDiffData() better handling of free blocks. 2014-07-05 01:11:28 +02:00
antirez
26216ed305 redis-benchmark: abort when all clients are disconnected. 2014-07-04 17:52:18 +02:00
antirez
b8f4f661f1 Fine tuning of aofReadDiffFromParent() calls trigger. 2014-07-04 17:51:03 +02:00
antirez
9d302ec21e Use amount of I/O not ops to trigger aofReadDiffFromParent(). 2014-07-04 16:03:46 +02:00
antirez
1937f8a8b0 aofChildWriteDiffData(): write as much as possible. 2014-07-04 15:54:20 +02:00
antirez
f4e54913d6 Handle write failure in AOF parent -> child ACK. 2014-07-04 15:37:49 +02:00
antirez
cfa0cad4af Use a timeout when reading parent ack from AOF child. 2014-07-04 15:35:01 +02:00
antirez
3f77583764 Send AOF diffs from parent to child to improve latency. 2014-07-04 15:27:23 +02:00
antirez
1e8520e84a 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-04 11:51:30 +02:00
antirez
3a9acbdb5d Fixed conditional for aof-write-pending-fsync latency event selection. 2014-07-02 17:42:29 +02:00
antirez
9bdfff137f Dependencies updated. 2014-07-02 17:04:14 +02:00
antirez
db90e562e7 Cast void* to char* to avoid waring in latencyCommand(). 2014-07-02 16:56:08 +02:00
antirez
0954e4ede9 Properly initialize min/max in latency.c. 2014-07-02 16:55:34 +02:00
antirez
4a89da385c latencyStartMonitor() modified to avoid warnings. 2014-07-02 16:53:44 +02:00
antirez
2dfe2d9493 Latency monitor: specialize delayed aof writes events. 2014-07-02 16:45:45 +02:00
antirez
d13384e7d3 LATENCY GRAPH: filling under the curve is more readable. 2014-07-02 16:37:53 +02:00
antirez
0039e2e996 LATENCY GRAPH implemented. 2014-07-02 16:31:22 +02:00
antirez
1760e6ede1 latencyTimeSeries structure max field type fixed. 2014-07-02 16:14:28 +02:00
antirez
b55b72c3e1 Free labels in freeSparklineSequence(). 2014-07-02 12:49:14 +02:00
antirez
2127c8e8fa LATENCY LATEST: add the max field. 2014-07-02 12:40:38 +02:00
antirez
71c60780e1 Latency monitor trheshold value is now configurable.
This commit adds both support for redis.conf and CONFIG SET/GET.
2014-07-02 12:28:17 +02:00
antirez
fa7679c047 ASCII sparklines generation API. 2014-07-02 10:13:53 +02:00