Commit 4f8b18f3 authored by antirez's avatar antirez
Browse files

Replication: master_link_down_since_seconds initial value should be huge.

server.repl_down_since used to be initialized to the current time at
startup. This is wrong since the replication never started. Clients
testing this filed to check if data is uptodate should never believe
data is recent if we never ever connected to our master.
parent c6425599
...@@ -1222,7 +1222,7 @@ void initServerConfig() { ...@@ -1222,7 +1222,7 @@ void initServerConfig() {
server.repl_syncio_timeout = REDIS_REPL_SYNCIO_TIMEOUT; server.repl_syncio_timeout = REDIS_REPL_SYNCIO_TIMEOUT;
server.repl_serve_stale_data = 1; server.repl_serve_stale_data = 1;
server.repl_slave_ro = 1; server.repl_slave_ro = 1;
server.repl_down_since = time(NULL); server.repl_down_since = 0; /* Never connected, repl is down since EVER. */
server.repl_disable_tcp_nodelay = 0; server.repl_disable_tcp_nodelay = 0;
server.slave_priority = REDIS_DEFAULT_SLAVE_PRIORITY; server.slave_priority = REDIS_DEFAULT_SLAVE_PRIORITY;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment