redict/src
antirez e0f22df995 Fix replicas migration by adding a new flag.
Some time ago I broken replicas migration (reported in #2924).
The idea was to prevent masters without replicas from getting replicas
because of replica migration, I remember it to create issues with tests,
but there is no clue in the commit message about why it was so
undesirable.

However my patch as a side effect totally ruined the concept of replicas
migration since we want it to work also for instances that, technically,
never had slaves in the past: promoted slaves.

So now instead the ability to be targeted by replicas migration, is a
new flag "migrate-to". It only applies to masters, and is set in the
following two cases:

1. When a master gets a slave, it is set.
2. When a slave turns into a master because of fail over, it is set.

This way replicas migration targets are only masters that used to have
slaves, and slaves of masters (that used to have slaves... obviously)
and are promoted.

The new flag is only internal, and is never exposed in the output nor
persisted in the nodes configuration, since all the information to
handle it are implicit in the cluster configuration we already have.
2015-12-09 23:03:18 +01:00
..
.gitignore Ignore gcov/lcov artifacts 2012-04-13 17:52:33 -07:00
adlist.c Fix typos 2014-09-29 06:49:07 -04:00
adlist.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
ae_epoll.c Fixed grammar: before H the article is a, not an. 2013-12-05 16:35:32 +01:00
ae_evport.c ae.c event loop: API to resize the fd set size on the run. 2013-06-28 16:39:49 +02:00
ae_kqueue.c No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
ae_select.c ae.c event loop: API to resize the fd set size on the run. 2013-06-28 16:39:49 +02:00
ae.c Remove redundant event loop fd processing 2014-08-08 10:43:54 +02:00
ae.h ae.c event loop: API to resize the fd set size on the run. 2013-06-28 16:39:49 +02:00
anet.c anet.c: new API anetTcpNonBlockBestEffortBindConnect() 2015-06-11 14:34:38 +02:00
anet.h anet.c: new API anetTcpNonBlockBestEffortBindConnect() 2015-06-11 14:34:38 +02:00
aof.c Lua debugger: foundations implemented. 2015-11-17 15:43:20 +01:00
asciilogo.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
atomicvar.h Atomic vars implemented in a more general way. 2015-10-01 13:02:25 +02:00
bio.c Lazyfree: ability to free whole DBs in background. 2015-10-01 13:02:26 +02:00
bio.h Threaded lazyfree WIP #1. 2015-10-01 13:02:25 +02:00
bitops.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
blocked.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
cluster.c Fix replicas migration by adding a new flag. 2015-12-09 23:03:18 +01:00
cluster.h Fix replicas migration by adding a new flag. 2015-12-09 23:03:18 +01:00
config.c Lazyfree options implemented in the configuration. 2015-10-05 12:11:27 +02:00
config.h HAVE_SYNC_FILE_RANGE should be protected by ifdef __linux__. 2015-02-10 09:29:14 +01:00
crc16.c RDMF (Redis/Disque merge friendlyness) refactoring WIP 1. 2015-07-26 15:17:18 +02:00
crc64.c Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
crc64.h Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
db.c Lazyfree: cond vars to enabled/disable it based on DEL context. 2015-10-02 15:27:57 +02:00
debug.c fix sprintf and snprintf format string 2015-11-28 09:05:41 +01:00
dict.c Lazyfree: a first implementation of non blocking DEL. 2015-10-01 13:00:19 +02:00
dict.h Lazyfree: a first implementation of non blocking DEL. 2015-10-01 13:00:19 +02:00
endianconv.c Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
endianconv.h Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
fmacros.h Silence _BSD_SOURCE warnings in glibc 2.20 and forward 2014-12-05 12:41:59 +11:00
geo.c Fix extractLongLatOrReply() sanity check conditionals. 2015-10-07 22:27:18 +02:00
geo.h RDMF (Redis/Disque merge friendlyness) refactoring WIP 1. 2015-07-26 15:17:18 +02:00
help.h Update redis-cli help and the script to generate it. 2015-11-17 15:38:34 +01:00
hyperloglog.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
intset.c SPOP: reimplemented for speed and better distribution. 2015-02-11 10:52:28 +01:00
intset.h SPOP: reimplemented for speed and better distribution. 2015-02-11 10:52:28 +01:00
latency.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
latency.h Separate latency monitoring of eviction loop and eviction DELs. 2015-02-11 10:52:27 +01:00
lazyfree.c Lazyfree: pending objects count in INFO output. 2015-10-01 13:02:26 +02:00
lzf_c.c Upgrade LZF to 3.6 (2011) from 3.5 (2009) 2015-01-02 11:16:10 -05:00
lzf_d.c Upgrade LZF to 3.6 (2011) from 3.5 (2009) 2015-01-02 11:16:10 -05:00
lzf.h No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
lzfP.h Upgrade LZF to 3.6 (2011) from 3.5 (2009) 2015-01-02 11:16:10 -05:00
Makefile Lazyfree: a first implementation of non blocking DEL. 2015-10-01 13:00:19 +02:00
Makefile.dep Dependencies updated. 2015-10-30 12:15:07 +01:00
memtest.c Include stropts only if __sun is defined. 2014-12-09 12:59:46 +01:00
mkreleasehdr.sh suppress external diff program when using git diff. 2013-02-24 18:17:46 +01:00
multi.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
networking.c Fix typo in prepareClientToWrite() comment. 2015-11-27 16:17:21 +01:00
notify.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
object.c Lazyfree: Hash converted to use plain SDS WIP 4. 2015-10-01 13:02:25 +02:00
pqsort.c No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
pqsort.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
pubsub.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
quicklist.c Fix quicklist tests for Pop() 2015-02-17 11:33:08 -05:00
quicklist.h Allow compression of interior quicklist nodes 2015-01-02 11:16:09 -05:00
rand.c Use 'void' for zero-argument functions 2014-08-08 10:05:32 +02:00
rand.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
rdb.c Lazyfree: Hash converted to use plain SDS WIP 5. 2015-10-01 13:02:25 +02:00
rdb.h RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
redis-benchmark.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
redis-check-aof.c BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
redis-check-rdb.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
redis-cli.c fix sprintf and snprintf format string 2015-11-28 09:05:41 +01:00
redis-trib.rb Add back blank line 2015-10-14 06:58:36 +01:00
redisassert.h RDMF: redisAssert -> serverAssert. 2015-07-26 15:29:53 +02:00
release.c No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
replication.c Centralize slave replication handshake aborting. 2015-12-03 10:38:56 +01:00
rio.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
rio.h Diskless replication: rio fdset target new supports buffering. 2014-10-17 11:36:12 +02:00
scripting.c Revert Lua's redis.LOG_<level> to original 2015-11-27 15:55:38 +02:00
sds.c Lua debugger: use sds_malloc() to allocate eval cli array. 2015-11-17 15:43:23 +01:00
sds.h Lua debugger: use sds_malloc() to allocate eval cli array. 2015-11-17 15:43:23 +01:00
sdsalloc.h SDS: changes to unify Redis SDS with antirez/sds repo. 2015-07-25 17:25:44 +02:00
sentinel.c Sentinel: command arity check added where missing. 2015-09-08 09:27:43 +02:00
server.c Handle wait3() errors. 2015-11-27 16:11:05 +01:00
server.h Lua debugger: call wait3() if there are pending forked debugging sessions. 2015-11-17 15:43:23 +01:00
setproctitle.c Set proctitle: avoid the use of __attribute__((constructor)). 2013-02-27 11:50:35 +01:00
sha1.c sha1.c: use standard uint32_t. 2015-04-27 12:07:49 +02:00
sha1.h sha1.c: use standard uint32_t. 2015-04-27 12:07:49 +02:00
slowlog.c RDMF: REDIS_OK REDIS_ERR -> C_OK C_ERR. 2015-07-26 23:17:55 +02:00
slowlog.h RDMF: use client instead of redisClient, like Disque. 2015-07-26 15:20:52 +02:00
solarisfixes.h Check for __sun macro in solarisfixes.h, not in includers. 2015-01-09 11:23:22 +01:00
sort.c Lazyfree: Hash converted to use plain SDS WIP 4. 2015-10-01 13:02:25 +02:00
sparkline.c RDMF (Redis/Disque merge friendlyness) refactoring WIP 1. 2015-07-26 15:17:18 +02:00
sparkline.h LATENCY GRAPH implemented. 2014-07-02 16:31:22 +02:00
syncio.c syncWithMaster(): non blocking state machine. 2015-08-06 18:12:20 +02:00
t_hash.c Fix HINCRBYFLOAT to work with long doubles. 2015-11-04 17:16:34 +01:00
t_list.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
t_set.c Lazyfree: Convert Sets to use plains SDS (several commits squashed). 2015-10-01 13:02:24 +02:00
t_string.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
t_zset.c Lazyfree: Sorted sets convereted to plain SDS. (several commits squashed) 2015-10-01 13:02:24 +02:00
testhelp.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
util.c Fix HINCRBYFLOAT to work with long doubles. 2015-11-04 17:16:34 +01:00
util.h Fix HINCRBYFLOAT to work with long doubles. 2015-11-04 17:16:34 +01:00
valgrind.sup more valgrind friendly test 2011-07-06 15:22:00 +02:00
version.h Mark version of unstable branch in an unique way. 2015-09-29 17:30:24 +02:00
ziplist.c Free ziplist test lists during tests 2015-01-02 11:16:08 -05:00
ziplist.h Add header guard for ziplist.h 2015-04-29 10:33:21 +02:00
zipmap.c Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
zipmap.h Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
zmalloc.c zmalloc.c converted to use atomicvar.h. 2015-10-01 13:02:25 +02:00
zmalloc.h getMemorySize() moved into zmalloc.c with other low level mem utils. 2014-12-17 17:11:20 +01:00