Skip to content

Commit

Permalink
Fix replication rdb load timeout (#251)
Browse files Browse the repository at this point in the history
* don't timeout replication when loading rdb

* fix bracket placement
  • Loading branch information
msotheeswaran-sc authored and GitHub Enterprise committed Jan 30, 2024
1 parent d1484aa commit 5681d06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/replication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5681d06

Please sign in to comment.