Revision c98457ae src/raft/RaftManager.cc

View differences:

src/raft/RaftManager.cc
605 605
        }
606 606
    }
607 607

  
608
    if ( db_last_index > replicated_index )
608
    if ((db_last_index > replicated_index) && (state == LEADER))
609 609
    {
610 610
        replica_manager.replicate(follower_id);
611 611
    }
......
632 632
        }
633 633
    }
634 634

  
635
    replica_manager.replicate(follower_id);
635
    if ( state == LEADER )
636
    {
637
        replica_manager.replicate(follower_id);
638
    }
636 639

  
637 640
    pthread_mutex_unlock(&mutex);
638 641
}

Also available in: Unified diff