From 5681d067a69fbc4513696d5ab05686bfa68e731f Mon Sep 17 00:00:00 2001 From: Malavan Sotheeswaran Date: Tue, 30 Jan 2024 14:22:51 -0500 Subject: [PATCH] Fix replication rdb load timeout (#251) * don't timeout replication when loading rdb * fix bracket placement --- src/replication.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/replication.cpp b/src/replication.cpp index 82f9d01e6..5f53d393e 100644 --- a/src/replication.cpp +++ b/src/replication.cpp @@ -4823,7 +4823,8 @@ void replicationCron(void) { /* Bulk transfer I/O timeout? */ if (mi->masterhost && mi->repl_state == REPL_STATE_TRANSFER && - (time(NULL)-mi->repl_transfer_lastio) > g_pserver->repl_timeout) + (time(NULL)-mi->repl_transfer_lastio) > g_pserver->repl_timeout && + !(g_pserver->loading & LOADING_REPLICATION)) { serverLog(LL_WARNING,"Timeout receiving bulk data from MASTER... If the problem persists try to set the 'repl-timeout' parameter in keydb.conf to a larger value."); cancelReplicationHandshake(mi,true);