mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-13 12:58:17 +03:00
F #4809: Do not start Raft timer in solo mode
This commit is contained in:
parent
a09c6d4859
commit
4705043396
@ -25,7 +25,7 @@
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
const time_t RaftManager::timer_period_ms = 10;
|
||||
const time_t RaftManager::timer_period_ms = 50;
|
||||
|
||||
static void set_timeout(long long ms, struct timespec& timeout)
|
||||
{
|
||||
@ -207,7 +207,16 @@ extern "C" void * raft_manager_loop(void *arg)
|
||||
|
||||
NebulaLog::log("RCM",Log::INFO,"Raft Consensus Manager started.");
|
||||
|
||||
raftm->am.loop(timeout);
|
||||
if ( raftm->is_solo() )
|
||||
{
|
||||
raftm->am.loop();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
raftm->am.loop(timeout);
|
||||
}
|
||||
|
||||
|
||||
NebulaLog::log("RCM",Log::INFO,"Raft Consensus Manager stopped.");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user