Skip to content

Commit 5681d06

Browse files
msotheeswaran-scGitHub Enterprise
authored and
GitHub Enterprise
committed
Fix replication rdb load timeout (#251)
* don't timeout replication when loading rdb * fix bracket placement
1 parent d1484aa commit 5681d06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/replication.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4823,7 +4823,8 @@ void replicationCron(void) {
48234823

48244824
/* Bulk transfer I/O timeout? */
48254825
if (mi->masterhost && mi->repl_state == REPL_STATE_TRANSFER &&
4826-
(time(NULL)-mi->repl_transfer_lastio) > g_pserver->repl_timeout)
4826+
(time(NULL)-mi->repl_transfer_lastio) > g_pserver->repl_timeout &&
4827+
!(g_pserver->loading & LOADING_REPLICATION))
48274828
{
48284829
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.");
48294830
cancelReplicationHandshake(mi,true);

0 commit comments

Comments
 (0)