diff options
author | antirez <antirez@gmail.com> | 2016-11-28 17:54:04 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2016-11-28 17:54:04 +0100 |
commit | eab865a0a1d7e3cb2494c02e601dbdb93b48533c (patch) | |
tree | a003de160f6152fe5088e5c19d58901fc965a4e9 /tests | |
parent | 16559a02fc12e4bf3d91657b9f775e144474abbb (diff) | |
download | redis-eab865a0a1d7e3cb2494c02e601dbdb93b48533c.tar.gz |
PSYNC2: stop sending newlines to sub-slaves when master is down.
This actually includes two changes:
1) No newlines to take the master-slave link up when the upstream master
is down. Doing this is dangerous because the sub-slave often is received
replication protocol for an half-command, so can't receive newlines
without desyncing the replication link, even with the code in order to
cancel out the bytes that PSYNC2 was using. Moreover this is probably
also not needed/sane, because anyway the slave can keep serving
requests, and because if it's configured to don't serve stale data, it's
a good idea, actually, to break the link.
2) When a +CONTINUE with a different ID is received, we now break
connection with the sub-slaves: they need to be notified as well. This
was part of the original specification but for some reason it was not
implemented in the code, and was alter found as a PSYNC2 bug in the
integration testing.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/psync2.tcl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/integration/psync2.tcl b/tests/integration/psync2.tcl index 46a08dad1..0857381c1 100644 --- a/tests/integration/psync2.tcl +++ b/tests/integration/psync2.tcl @@ -87,6 +87,7 @@ start_server {} { set slave_id [randomInt 5] if {$disconnect} { $R($slave_id) client kill type master + puts "+++ Breaking link for slave #$slave_id" } } } |