mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-15 09:13:15 +09:00
F #2147: Reset election timeout on turning into follower
(cherry picked from commit 49ae026876)
This commit is contained in:
1 parent
53fe56a991
commit
2748383b1a
1 file changed
+6
@@ -562,6 +562,12 @@ void RaftManager::follower(unsigned int _term)
|
||||
|
||||
requests.clear();
|
||||
|
||||
//Reset heartbeat when turning into follower when a higher term is found:
|
||||
// 1. On vote request
|
||||
// 2. On heartbeat response
|
||||
// 3. On log replicate request
|
||||
clock_gettime(CLOCK_REALTIME, &last_heartbeat);
|
||||
|
||||
pthread_mutex_unlock(&mutex);
|
||||
|
||||
if ( nd.is_federation_master() )
|
||||
|
||||
Reference in new issue
Block a user