4786 Commits

Author SHA1 Message Date
antirez
5130c2536b Cluster: set the slaves->slaveof filed to NULL when master is freed.
Related to issue #2289.
2015-01-22 10:35:08 +01:00
Matt Stancliff
98f56f8f9e Add --track-origins=yes to valgrind 2015-01-22 10:35:04 +01:00
Matt Stancliff
fa470fe782 Tell sentinel/cluster tests to allow valgrind 2015-01-22 10:35:00 +01:00
antirez
26698af37d luaRedisGenericCommand(): log error at WARNING level when re-entered.
Rationale is that when re-entering, it is likely due to Lua debugging
hooks. Returning an error will be ignored in most cases, going totally
unnoticed. With the log at least we leave a trace.

Related to issue #2302.
2015-01-22 10:34:44 +01:00
antirez
9b92edddfa luaRedisGenericCommand() recursion: just return an error.
Instead of calling redisPanic() to abort the server.

Related to issue #2302.
2015-01-22 10:34:38 +01:00
antirez
83a6cc3398 Panic on recursive calls to luaRedisGenericCommand().
Related to issue #2302.
2015-01-22 10:34:34 +01:00
antirez
23cc0a3f1c AOF rewrite: set iterator var to NULL when freed.
The cleanup code expects that if 'di' is not NULL, it is a valid
iterator that should be freed.

The result of this bug was a crash of the AOF rewriting process if an
error occurred after the DBs data are written and the iterator is no
longer valid.
2015-01-21 16:42:38 +01:00
antirez
6fe6cbd0ef RC2 release date fixed in Changelog. 2015-01-13 18:09:57 +01:00
antirez
12dcd2d7ac Redis 2.9.102 (3.0.0 Release Candidate 2). 2015-01-13 18:09:57 +01:00
antirez
4ad1b2f889 RC2 release date fixed in Changelog. 2015-01-13 18:09:40 +01:00
antirez
063e0a8810 Redis 2.9.102 (3.0.0 Release Candidate 2). 3.0.0-rc2 2015-01-13 16:35:36 +01:00
antirez
df1a7fc4fe Cluster: fetch my IP even if msg is not MEET for the first time.
In order to avoid that misconfigured cluster nodes at some time may
force an IP update on other nodes, it is required that nodes update
their own address only on MEET messages. However it does not make sense
to do this the first time a node is contacted and yet does not have an
IP, we just risk that myself->ip remains not assigned if there are
messages lost or cluster creation procedures that don't make sure
everybody is targeted by at least one incoming MEET message.

Also fix the logging of the IP switch avoiding the :-1 tail.
2015-01-13 16:23:48 +01:00
antirez
45e2a26ded Cluster: clusterMsgDataGossip structure, explict padding + minor stuff.
Also explicitly set version to 0, add a protocol version define, improve
comments in the gossip structure.

Note that the structure layout is the same after the change, we are just
making the padding explicit with an additional not used 16 bits field.
So this commit is still able to talk with the previous versions of
cluster nodes.
2015-01-13 16:23:44 +01:00
antirez
799a3ccac1 Suppress valgrind error about write sending uninitialized data.
Valgrind checks that the buffers we transfer via syscalls are all
composed of bytes actually initialized. This is useful, it makes we able
to avoid leaking informations in non initialized parts fo messages
transferred to other hosts. This commit fixes one of such issues.
2015-01-13 16:23:40 +01:00
antirez
1584c7a31b Cluster: initialize mf_end.
Can't be initialized by resetManualFailover() since it's actual state
the function uses, so we need to initialize it at startup time. Not
really a bug in practical terms, but showed up into valgrind and is not
technically correct anyway.
2015-01-12 15:40:30 +01:00
antirez
8be8780d4a Add "-lrt" in Makefile for Solaris.
This fix is from @NanXiao, however I was not able to retain authorship
because the Pull Request original repository was removed.
2015-01-09 11:54:50 +01:00
antirez
f2348a2b7f Check for __sun macro in solarisfixes.h, not in includers. 2015-01-09 11:22:14 +01:00
antirez
7c283c5218 Cluster test: also write from Lua script in resharding test. 2015-01-09 11:06:38 +01:00
antirez
6f3553a2fe Prevent Lua scripts from violating Redis Cluster keyspace access rules.
Before this commit scripts were able to access / create keys outside the
set of hash slots served by the local node.
2015-01-09 10:39:05 +01:00
Matt Stancliff
67cc0d0851 Remove end of line whitespace from redis-trib 2015-01-08 19:46:02 +01:00
Matt Stancliff
d1b607aa66 Fix redis-trib cluster create
Under certain conditions the node list wasn't being fully populated
and 'create' would fail trying to call methods on nil objects.
2015-01-08 19:46:02 +01:00
Matt Stancliff
6742dab413 Improve redis-trib replica assignment
This tiny bit of code has gone through so many revisions.  Hopefully
it's more correct now.

Fixes #2204
2015-01-08 19:46:02 +01:00
antirez
2247189e3e README section about make distclean reworded / extended. 2015-01-08 16:35:39 +01:00
Jungtaek Lim
eff9e987d3 Explain make distclean which seems not well known 2015-01-08 16:35:34 +01:00
antirez
198fb1621a Advertise Redis Cluster as experimental in redis.conf. 2015-01-08 14:41:26 +01:00
antirez
1e8f1577c5 INFO loading stats: three fixes.
1. Server unxtime may remain not updated while loading AOF, so ETA is
not updated correctly.

2. Number of processed byte was not initialized.

3. Possible division by zero condition (likely cause of issue #1932).
2014-12-23 14:54:31 +01:00
Alon Diamant
aad0c512cc Fixed memory leaks in rdbSaveToSlavesSockets() 2014-12-22 11:01:17 +01:00
antirez
9cb99f547d Fix adjustOpenFilesLimit() logging to match real state.
Fixes issue #2225.
2014-12-19 10:05:07 +01:00
Matt Stancliff
8bce654246 Cluster: Notify user on accept error
If we woke up to accept a connection, but we can't
accept it, inform the user of the error going on
with their networking.

(The previous message was the same for success or error!)
2014-12-17 17:48:55 +01:00
Rhommel Lamas
6aba87be82 Add redis-sentinel symlink to a relative path 2014-12-17 12:27:41 +01:00
antirez
86213b4e03 Fix comment in clusterHandleSlaveFailover(). 2014-12-16 15:03:23 +01:00
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