4705 Commits

Author SHA1 Message Date
antirez
2c6dc9f15f Make sure buffer is enough in clusterSendPing(). 2014-12-15 10:18:29 +01:00
antirez
722faed62a Don't log admin commands in MONITOR.
Otherwise there are security risks, especially when providing Redis as a
service, the user may "sniff" for admin commands renamed to an
unguessable string via rename-command in redis.conf.
2014-12-13 08:58:34 +01:00
antirez
cc7b9171ca List of commands flagged as admin commands modified.
The old list did not made much sense... and the flag is currently not
used at all, so no side effects.
2014-12-13 08:58:34 +01:00
Rhommel Lamas
31bf7976b5 Add symlink to redis-sentinel during make install 2014-12-12 22:59:28 +01:00
antirez
a419537800 Lua cmsgpack lib updated to latest version.
It fixes a bad bug that crashes the server in certain conditions
as shown in issue #2210.
2014-12-12 22:57:07 +01:00
antirez
814cd40215 SORT: Don't sort Set elements if not needed.
Related to #2094.
2014-12-11 15:58:29 +01:00
Matt Stancliff
77bbc0dfad Fix zero-ordering SORT when called against lists
People mostly use SORT against lists, but our prior
behavior was pretending lists were an unordered bag
requiring a forced-sort when no sort was requested.

We can just use the native list ordering to ensure
consistency across replicaion and scripting calls.

Closes #2079
Closes #545 (again)
2014-12-11 15:58:29 +01:00
zhanghailei
e1524f5010 FIXED redis-benchmark's idle mode.With idle mode shouldn't create write event 2014-12-11 15:21:42 +01:00
Ben Dowling
94d9482b61 Update redis_init_script.tpl
status command currently reports success when redis has crashed and the pid file still exists. Changing to check the actual process is running.
2014-12-11 15:21:28 +01:00
Nan Xiao
cc14d7f51d Fix function prototype in redis-cli.c.
Fix function prototype in redis-cli.c.
2014-12-11 15:09:20 +01:00
Matt Stancliff
c13d787d13 Fix redis-trib import SCAN call 2014-12-11 15:07:49 +01:00
h0x91b
b3349204b8 Reconnect redis-cli when cluster return "moved"
if redis works in cluster-mode and redis-cli was run with argv, reconnect if needs.
    example:
    ./redis-cli set foo bar

    if return is MOVED redis-cli just do nothing.
2014-12-11 15:07:49 +01:00
Mariano Pérez Rodríguez
0f1107432a Typo fixes in redis.conf
Fix two typos in redis.conf:

- "trnasfers" --> "transfers"
- "enalbed" --> "enabled"
2014-12-11 15:07:49 +01:00
Sun He
2f52a1191f zipmap.c: update comments above 2014-12-09 16:01:11 +01:00
Deepak Verma
c86b031572 replaced // comments #2150 2014-12-09 15:26:22 +01:00
azure provisioned user
0aac7ad8ff redis-benchmark AUTH command to be discarded after the first send #2150 2014-12-09 15:26:22 +01:00
Sun He
c5b449ea55 sds.c: Correct two spelling mistakes in comments 2014-12-09 15:14:09 +01:00
Sun He
559cefce13 sds.c/sdscatvprintf: set va_end to finish va_list cpy 2014-12-09 15:14:09 +01:00
Sun He
3959fa2c02 sds.c: Correct some comments 2014-12-09 15:14:09 +01:00
antirez
24ae9a4a82 redis-benchmark: default num of requests is now 100000.
10000 completes in a too short time and may easily provide unreliable
figures because of tiny duration.
2014-12-09 13:02:10 +01:00
Matthias Petschick
97d31c63e8 fix benchmark memleak in loop mode 2014-12-09 13:02:10 +01:00
antirez
73996c8615 Cluster PUBLISH message: fix totlen count.
bulk_data field size was not removed from the count. It is not possible
to declare it simply as 'char bulk_data[]' since the structure is nested
into another structure.
2014-12-09 13:01:47 +01:00
Serghei Iakovlev
e4d4eff15e Update whatisdoing.sh
Improved getting pid
2014-12-09 13:01:25 +01:00
antirez
2533e2994e Include stropts only if __sun is defined. 2014-12-09 12:59:36 +01:00
Jan-Erik Rediger
52bc358c11 Fix implicit declaration of ioctl on Solaris 2014-12-09 12:57:56 +01:00
Sun He
aa130caeae bitops.c/bitopCommand: skip short minlen for FAST PATH 2014-12-09 12:46:43 +01:00
Sun He
5fc55a1afa bitops.c/redisPopcount: little optimization in loop 2014-12-09 12:46:43 +01:00
Johan Bergström
5ab2c31189 Silence _BSD_SOURCE warnings in glibc 2.20 and forward
See https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes
2014-12-09 12:24:28 +01:00
antirez
cfe04da17d Mark whatisdoing.sh as deprecated in top-comment. 2014-12-09 12:18:39 +01:00
Serghei Iakovlev
81eed2f5f6 getting pid fixes
```sh
$ ~ pidof redis-server
# nothing

$ ~ ps aux | grep [r]edis
redis      593  0.0  0.0  36900  5564 ?        Ssl  Dec02   1:37 /usr/bin/redis-server 127.0.0.1:6379
klay     15927  0.0  0.0  16772  6068 pts/6    S+   13:58   0:00 redis-cli

$ ~ uname -a
Linux edge 3.17.4-1-ARCH #1 SMP PREEMPT Fri Nov 21 21:14:42 CET 2014 x86_64 GNU/Linux
```
2014-12-09 12:09:34 +01:00
Sun He
bafd82167b sparkline.c: AddSample skip Empty label 2014-12-09 11:28:50 +01:00
Sun He
6370afc281 sparkline.c: mov label-ini into the AddSample Function 2014-12-09 11:28:50 +01:00
Jan-Erik Rediger
c8305accc3 Only ignore sigpipe in interactive mode
This allows shell pipes to correctly end redis-cli.

Ref #2066
2014-12-09 09:01:08 +01:00
antirez
edd7ab325a Simplify lua_cmsgpack macro and fix build on old Linux distros.
Thanks to @badboy for the help in checking the build after the fix.
2014-12-05 10:52:54 +01:00
antirez
e7d6f51dcb Check that tcp-backlog is matched by /proc/sys/net/core/somaxconn. 2014-12-04 11:07:52 +01:00
antirez
8a67e5d456 Network bandwidth tracking + refactoring.
Track bandwidth used by clients and replication (but diskless
replication is not tracked since the actual transfer happens in the
child process).

This includes a refactoring that makes tracking new instantaneous
metrics simpler.
2014-12-03 12:17:15 +01:00
antirez
8fb0d455d4 Don't show the ASCII logo if syslog is enabled.
Closes issue #1935.
2014-12-03 10:52:07 +01:00
antirez
237b37a727 Regression test for issue #2175. 2014-12-03 10:41:03 +01:00
antirez
b42e00065f Handle infinite explicitly in createStringObjectFromLongLong(). 2014-12-03 10:41:03 +01:00
antirez
b6b7bc0bff Use exp format and more precision output for ZSCAN.
Ref: issue #2175
2014-12-03 10:41:03 +01:00
antirez
6a0b1b5b43 Over 80 chars comment trimmed in pfcountCommand(). 2014-12-02 17:03:20 +01:00
antirez
69efb59ac7 Mark PFCOUNT as read-only, even if not true.
PFCOUNT is technically speaking a write command, since the cached value
of the HLL is exposed in the data structure (design error, mea culpa), and
can be modified by PFCOUNT.

However if we flag PFCOUNT as "w", read only slaves can't execute the
command, which is a problem since there are environments where slaves
are used to scale PFCOUNT reads.

Nor it is possible to just prevent PFCOUNT to modify the data structure
in slaves, since without the cache we lose too much efficiency.

So while this commit allows slaves to create a temporary inconsistency
(the strings representing the HLLs in the master and slave can be
different in certain moments) it is actually harmless.

In the long run this should be probably fixed by turning the HLL into a
more opaque representation, for example by storing the cached value in
the part of the string which is not exposed (this should be possible
with SDS strings).
2014-12-02 17:01:53 +01:00
antirez
2e4d043c20 Mark diskless replication as experimental in redis.conf. 2014-12-02 14:13:42 +01:00
antirez
bed4108b72 Test: wait for actual startup in start_server.
start_server now uses return value from Tcl exec to get the server pid,
however this introduces errors that depend from timing: a lot of the
testing code base assumed the server to be actually up and running when
server_start returns.

So the old code that waits to see the pid in the log file was restored.
2014-11-28 12:58:11 +01:00
antirez
edd1ea2a68 Test: try to cleanup still running Redis instances on exit.
It's hard to run the Redis test continuously if it leaks processes on
exceptions / errors.
2014-11-28 12:58:11 +01:00
antirez
4d316967e8 Test framework: exit on timeout with report.
There was no sane way to detect tests that may never end because of
Redis bugs or tests bugs.
2014-11-28 12:58:11 +01:00
antirez
4c1b3add7f Fix DEBUG OBJECT lru field to report seconds.
Because of (not so) recent Redis changes, now the LRU internally
reported unit is milliseconds, not seconds, but the DEBUG OBJECT output
was still claiming seconds while providing milliseconds.
However OBJECT IDLETIME was working as expected, which is the correct
API to use.
2014-11-26 16:40:04 +01:00
antirez
1490809f1f Document redis-cli --stat in --help output. 2014-11-25 18:25:55 +01:00
Matt Stancliff
b1c426ef73 Fix lua-cmsgpack 64 bit integer on 32 bit platform
This syncs lua-cmsgpack with the mattsta/lua-cmsgpack upstream.

Fixes #2161
2014-11-25 15:56:55 +01:00
antirez
f2876f6cf7 Avoid valgrind memory leak false positive in processInlineBuffer().
zmalloc(0) cauesd to actually trigger a non-zero allocation since with
standard libc malloc we have our own zmalloc header for memory tracking,
but at the same time the returned pointer is at the end of the block and
not in the middle. This triggers a false positive when testing with
valgrind.

When the inline protocol args count is 0, we now avoid reallocating
c->argv, preventing the issue to happen.
2014-11-25 14:51:00 +01:00