Commit Graph

4892 Commits

Author SHA1 Message Date
55e8d4cf1b Add 3.0 changed config default for maxmemory policy to release notes. 2015-06-29 17:23:52 +02:00
d4a7c9e1ab Update t_zset.c 2015-06-11 15:15:45 +02:00
4e8759c65e Use best effort address binding to connect to the master
We usually want to reach the master using the address of the interface
Redis is bound to (via the "bind" config option). That's useful since
the master will get (and publish) the slave address getting the peer
name of the incoming socket connection from the slave.

However, when this is not possible, for example because the slave is
bound to the loopback interface but repliaces from a master accessed via
an external interface, we want to still connect with the master even
from a different interface: in this case it is not really important that
the master will provide any other address, while it is vital to be able
to replicate correctly.

Related to issues #2609 and #2612.
2015-06-11 13:01:06 +02:00
a8d7f00e2e anet.c: new API anetTcpNonBlockBestEffortBindConnect()
This performs a best effort source address binding attempt. If it is
possible to bind the local address and still have a successful
connect(), then this socket is returned. Otherwise the call is retried
without source address binding attempt.

Related to issues #2609 and #2612.
2015-06-11 13:01:04 +02:00
af8a9de663 anetTcpGenericConnect(), jump to error not end on error
Two code paths jumped to the "ok, return the socket to the user" code
path to handle error conditions.

Related to issues #2609 and #2612.
2015-06-11 13:00:55 +02:00
d815289d54 Don't try to bind the source address for MIGRATE
Related to issues #2609 and #2612.
2015-06-11 13:00:52 +02:00
f58d67b015 Fix 3.0.2 release notes to give full credits. 2015-06-04 11:59:45 +02:00
01888d1e58 Redis 3.0.2 3.0.2 2015-06-04 11:35:56 +02:00
30278061cc hide access to debug table 2015-06-03 13:36:00 +02:00
49efe300af disable loading lua bytecode 2015-06-03 13:35:59 +02:00
702f914771 Scripting: Lua cmsgpack lib updated to include str8 support 2015-06-03 08:45:58 +02:00
e0b2e24830 Removed incorrect suggestion
DEL/INCR/DECR and others could be NTH but apparently never made it to the implementation of SORT
2015-05-29 12:27:59 +02:00
0da453160b Test: ZADD CH tests 2015-05-29 12:27:17 +02:00
1d8973c47d ZADD RETCH option renamed CH
From Twitter:

    "@antirez that’s an awfully-named command :(
     http://en.wikipedia.org/wiki/Retching"
2015-05-29 12:27:17 +02:00
df7add9e70 Test: ZADD INCR test 2015-05-29 12:27:17 +02:00
9003483d43 Test: ZADD NX and XX options tests 2015-05-29 12:27:17 +02:00
a13d6378c1 ZADD RETCH option: Return number of elements added or updated
Normally ZADD only returns the number of elements added to a sorted
set, using the RETCH option it returns the sum of elements added or
for which the score was updated.
2015-05-29 12:27:17 +02:00
fa17e2daf0 ZADD NX and XX options 2015-05-29 12:27:17 +02:00
ff7c1faa12 ZADD implemenation able to take options. 2015-05-29 12:27:16 +02:00
e252e9f231 adding a sentinel command: "flushconfig"
This new command triggers a config flush to save the in-memory config to
disk. This is useful for cases of a configuration management system or a
package manager wiping out your sentinel config while the process is
still running - and has not yet been restarted. It can also be useful
for scripting a backup and migrate or clone of a running sentinel.
2015-05-25 12:06:52 +02:00
9c0a68861e Sentinel: CKQUORUM tests 2015-05-19 12:27:19 +02:00
5844f5d0d1 Sentinel: SENTINEL CKQUORUM command
A way for monitoring systems to check that Sentinel is technically able
to reach the quorum and failover, using the currently visible Sentinels.
2015-05-19 12:27:19 +02:00
a97658f293 Merge branch '3.0' of github.com:/antirez/redis into 3.0 2015-05-15 17:40:03 +02:00
138e7af57b Rewrite smoveCommand test with ternary operator 2015-05-15 17:39:37 +02:00
3a9f41ad86 uphold the smove contract to return 0 when the element is not a member of the source set, even if source=dest 2015-05-15 17:39:37 +02:00
71fba427c2 Merge pull request #2567 from ryanschwartz/patch-1
Update 00-RELEASENOTES
2015-05-15 17:22:21 +02:00
08d4df8d31 protocol error log should be seen debug/verbose level 2015-05-15 17:06:42 +02:00
e7422ef166 Update 00-RELEASENOTES
Fix typo in 00-RELEASENOTES.
2015-05-07 14:28:21 -05:00
362032e43a Release notes: Sentinel upgrade urgency moved to moderate 2015-05-05 11:16:20 +02:00
10323dc5fe Redis 3.0.1 3.0.1 2015-05-05 11:01:19 +02:00
e213c408fa sdsfree x and y 2015-05-04 13:03:01 +02:00
5674656db7 fix doc example 2015-05-04 13:03:01 +02:00
35d71b1ffc fix typo 2015-05-04 13:03:01 +02:00
6637862838 update copyright year 2015-05-04 12:56:50 +02:00
b065f4441b Making sentinel flush config on +slave
Originally, only the +slave event which occurs when a slave is
reconfigured during sentinelResetMasterAndChangeAddress triggers a flush
of the config to disk.  However, newly discovered slaves don't
apparently trigger this flush but do trigger the +slave event issuance.

So if you start up a sentinel, add a master, then add a slave to the
master (as a way to reproduce it) you'll see the +slave event issued,
but the sentinel config won't be updated with the known-slave entry.

This change makes sentinel do the flush of the config if a new slave is
deteted in sentinelRefreshInstanceInfo.
2015-05-04 12:55:27 +02:00
bd99b26bc5 Sentinel: remove useless sentinelFlushConfig() call
To rewrite the config in the loop that adds slaves back after a master
reset, in order to handle switching to another master, is useless: it
just adds latency since there is an fsync call in the inner loop,
without providing any additional guarantee, but the contrary, since if
after the first loop iteration the server crashes we end with just a
single slave entry losing all the other informations.

It is wiser to rewrite the config at the end when the full new
state is configured.
2015-05-04 12:55:27 +02:00
0560738f6b Fix Redis server crash when Lua command exceeds client output buffer
limit.
2015-05-04 12:20:24 +02:00
88d58661db fix sentinel memory leak 2015-05-04 12:18:05 +02:00
315e3b14ef Fix Sentinel memory leak (hiredis bug)
This fixes issue #2535, that was actually an hiredis library bug (I
submitted an issue and fix to the redis/hiredis repo as well).

When an asynchronous hiredis connection subscribes to a Pub/Sub channel
and gets an error, and in other related conditions, the function
redisProcessCallbacks() enters a code path where the link is
disconnected, however the function returns before freeing the allocated
reply object. This causes a memory leak. The memory leak was trivial to
trigger in Redis Sentinel, which uses hiredis, every time we tried to
subscribe to an instance that required a password, in case the Sentinel
was configured either with the wrong password or without password at
all. In this case, the -AUTH error caused the leaking code path to be
executed.

It was verified with Valgrind that after this change the leak no longer
happens in Sentinel with a misconfigured authentication password.
2015-04-28 22:15:09 +02:00
7ff051f6c1 sha1.c: use standard uint32_t. 2015-04-27 12:07:59 +02:00
f387a5acf8 Old warning removed from release notes. 2015-04-01 17:34:22 +02:00
1fab07e078 Redis 3.0.0. 3.0.0 2015-04-01 16:01:44 +02:00
8ebae5d630 dict.c: remove dictGetRandomKeys() API, no longer used. 2015-04-01 15:50:54 +02:00
21c3d77118 Merge pull request #2477 from asheldon/patch-1
2.8 is a subset of 3.0, not the converse.
2015-04-01 15:32:28 +02:00
60a28fad8a Net: improve prepareClientToWrite() error handling and comments.
When we fail to setup the write handler it does not make sense to take
the client around, it is missing writes: whatever is a client or a slave
anyway the connection should terminated ASAP.

Moreover what the function does exactly with its return value, and in
which case the write handler is installed on the socket, was not clear,
so the functions comment are improved to make the goals of the function
more obvious.

Also related to #2485.
2015-04-01 15:20:54 +02:00
e42baed4c3 Test: be more patient waiting for servers to exit.
This should likely fix a false positive when running with the --valgrind
option.
2015-04-01 15:20:54 +02:00
aa67aec84e fixes to diskless replication.
master was closing the connection if the RDB transfer took long time.
and also sent PINGs to the slave before it got the initial ACK, in which case the slave wouldn't be able to find the EOF marker.
2015-04-01 15:20:54 +02:00
93959bc09f Sentinel / Cluster test: exit with non-zero error code on failures. 2015-03-30 14:29:18 +02:00
2e92d0f04a Test: regression for issue #2473. 2015-03-27 12:11:27 +01:00
adcb470130 dict.c: add casting to avoid compilation warning.
rehashidx is always positive in the two code paths, since the only
negative value it could have is -1 when there is no rehashing in
progress, and the condition is explicitly checked.
2015-03-27 10:10:39 +01:00