4159 Commits

Author SHA1 Message Date
Jan-Erik Rediger
50669f7b66 redis-cli: fix latency result output
(Cleaned up a little by @mattsta)

Closes #1774
2014-08-27 10:24:11 +02:00
Wei Jin
9b53f79e00 Remove redundant else/return block
Fixes #1741
2014-08-27 10:24:08 +02:00
antirez
9840df7bad Clarify AIX "#undef hz". 2014-08-27 10:22:59 +02:00
siahl
b5dc2c5b91 Add support for compiling on AIX
Closes #1900
2014-08-27 10:22:28 +02:00
Matt Stancliff
cbd1607c6a redis-cli: Add --no-raw option
Some people need formatted output even when they have no
interactive tty.

Fixes #760
2014-08-27 10:21:19 +02:00
Matt Stancliff
9a039f76c2 redis-cli: stop showing incorrectly selected DB
Previously redis-cli would happily show "-1" or "99999"
as valid DB choices.

Now, if the SELECT call returned an error, we don't update
the DB number in the CLI.

Inspired by @anupshendkar in #1313

Fixes #566, #1313
2014-08-27 10:21:19 +02:00
Matt Stancliff
28b54b5d94 redis-cli: Re-attach selected DB after auth
Previously, if you did SELECT then AUTH, redis-cli
would show your SELECT'd db even though it didn't
happen.

Note: running into this situation is a (hopefully) very limited
used case of people using multiple DBs and AUTH all at the same
time.

Fixes antirez#1639
2014-08-27 10:21:19 +02:00
Yossi Gottlieb
ff58d5a380 Fail SYNC if background save child aborted due to a signal. 2014-07-28 14:46:03 +02:00
Salvatore Sanfilippo
eb7b3427e7 Merge pull request #1894 from veselov/2.8
* fixed doc URL for keyspace events
2014-07-28 09:38:33 +02:00
vps
4d7b3815d5 * fixed doc URL for keyspace events 2014-07-27 20:14:39 -07:00
antirez
9fa51dd4d1 Example redis.conf: improve slaveof description. 2014-07-25 14:20:31 +02:00
antirez
d558af8e6f Fix util.c compilation by including stdint.h. 2014-07-23 18:01:51 +02:00
antirez
e426e77896 Faster ll2string() implementation.
Based on ideas documented in this blog post:

https://www.facebook.com/notes/facebook-engineering/three-optimization-tips-for-c/10151361643253920

The original code was modified to handle signed integers, reformetted to
fit inside the Redis code base, and was stress-tested with a program
in order to validate the implementation against snprintf().

Redis was measured to be measurably faster from the point of view of
clients in real-world operations because of this change, since sometimes
number to string conversion is used extensively (for example every time
a GET results into an integer encoded object to be returned to the
user).
2014-07-23 14:58:26 +02:00
antirez
8a44e10848 PFSELFTEST: less false positives.
This is just a quickfix, for the nature of the test the right way to fix
it is to average the error of N runs, since otherwise it is always
possible to get a false positive with a bad run, or to minimize too much
this possibility we may end testing with too much "large" error ranges.
2014-07-23 11:45:03 +02:00
antirez
0bfdd4bb49 Test: check sorted set elements order after union.
This is not a regression but issue #1786 showed the need for this test.
2014-07-22 17:58:41 +02:00
antirez
098bb97703 Remove useless var and check in zunionInterGenericCommand(). 2014-07-22 17:58:26 +02:00
antirez
316e1db970 ZUNIONSTORE reimplemented for speed.
The user @kjmph provided excellent ideas to improve speed of ZUNIONSTORE
(in certain cases by many order of magnitude), together with an
implementation of the ideas.

While the ideas were sounding, the implementation could be improved both
in terms of speed and clearness, so that's my attempt at reimplementing
the speedup proposed, trying to improve by directly using just a
dictionary with an embedded score inside, and reusing the single-pass
aggregate + order-later approach.

Note that you can't apply this commit without applying the previous
commit in this branch that adds a double in the dictEntry value union.

Issue #1786.
2014-07-22 17:58:05 +02:00
antirez
c8a6cd94b3 Add double field in dict.c entry value union. 2014-07-22 17:53:06 +02:00
antirez
7b11dfe05e Test: Pub/Sub PING. 2014-07-18 12:03:38 +02:00
antirez
156029b336 Test: small integer sharing depends on maxmemory policy. 2014-07-18 10:55:19 +02:00
antirez
06e9b3cad8 PING: backward compatible error for wrong number of args. 2014-07-18 10:46:21 +02:00
antirez
ab5f20d19c 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:46:05 +02:00
antirez
70e39481ab 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 10:41:47 +02:00
antirez
294bcfc4d2 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 10:41:22 +02:00
antirez
0c29cadd46 Redis 2.8.13. 2.8.13 2014-07-14 17:48:14 +02:00
michael-grunder
3df2ab673c 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-14 15:38:32 +02:00
antirez
c970507478 Fix typo in LATENCY DOCTOR output. 2014-07-11 10:57:34 +02:00
antirez
bb10ad9c13 Test: more reliable AOF rewrite test under write load. 2014-07-10 16:42:52 +02:00
antirez
c785d4cccc LATENCY command / monitor basic tests. 2014-07-10 16:24:24 +02:00
antirez
e1fd73f634 LATENCY HISTORY returns empty array if no data is available.
Previously we returned an error.
2014-07-10 16:24:24 +02:00
antirez
315536d012 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:59 +02:00
antirez
f0e67afd94 Test: AOF rewrite during write load. 2014-07-10 11:24:59 +02:00
antirez
1f3c097b1c Fixed a few missing newline in createLatencyReport(). 2014-07-09 20:02:01 +02:00
antirez
e4db34e97c createLatencyReport(): compile before commit avoids commits. 2014-07-09 20:01:57 +02:00
antirez
f9765990b2 createLatencyReport(), fix mount option name. 2014-07-09 20:01:53 +02:00
antirez
54ca682887 createLatencyReport(): initialize all advices to zero. 2014-07-09 20:01:48 +02:00
antirez
95d880a7bf LATENCY DOCTOR first implementation complete. 2014-07-09 20:01:44 +02:00
antirez
2e581217d9 Fix analyzeLatencyForEvent() MAD computation. 2014-07-09 20:01:41 +02:00
antirez
121a9a3579 LATENCY DOCTOR: initial draft and events summary output. 2014-07-09 20:01:37 +02:00
antirez
3dd113bf33 Latency: low level time series analysis implemented. 2014-07-09 20:01:33 +02:00
antirez
3e8f5113fa LATENCY SAMPLES renamed LATENCY HISTORY. 2014-07-09 20:01:30 +02:00
antirez
c145854bac LATENCY RESET implemented. 2014-07-09 20:01:27 +02:00
antirez
65dbb3546a redis-benchmark: abort when all clients are disconnected. 2014-07-09 20:01:18 +02:00
antirez
4c68319370 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-09 20:01:01 +02:00
antirez
f3eab7a9b4 Fixed conditional for aof-write-pending-fsync latency event selection. 2014-07-09 20:00:57 +02:00
antirez
f3c4111edd Dependencies updated. 2014-07-09 20:00:50 +02:00
antirez
07b4d33734 Cast void* to char* to avoid waring in latencyCommand(). 2014-07-09 19:58:06 +02:00
antirez
58fb90fdac Properly initialize min/max in latency.c. 2014-07-09 19:57:59 +02:00
antirez
c005315a64 latencyStartMonitor() modified to avoid warnings. 2014-07-09 19:57:53 +02:00
antirez
e81b51ad8c Latency monitor: specialize delayed aof writes events. 2014-07-09 19:57:48 +02:00