1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-27 13:57:23 +03:00

F #2147: Reset election timeout on turning into follower

(cherry picked from commit 49ae0268769ee0b9a8cb42b5b0df95e9976338f6)
This commit is contained in:
Ruben S. Montero 2018-06-02 14:14:45 +02:00
parent 8d0f533a0d
commit 4733813280

View File

@ -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() )