Revision 47050433
src/raft/RaftManager.cc | ||
---|---|---|
25 | 25 |
|
26 | 26 |
/* -------------------------------------------------------------------------- */ |
27 | 27 |
/* -------------------------------------------------------------------------- */ |
28 |
const time_t RaftManager::timer_period_ms = 10;
|
|
28 |
const time_t RaftManager::timer_period_ms = 50;
|
|
29 | 29 |
|
30 | 30 |
static void set_timeout(long long ms, struct timespec& timeout) |
31 | 31 |
{ |
... | ... | |
207 | 207 |
|
208 | 208 |
NebulaLog::log("RCM",Log::INFO,"Raft Consensus Manager started."); |
209 | 209 |
|
210 |
raftm->am.loop(timeout); |
|
210 |
if ( raftm->is_solo() ) |
|
211 |
{ |
|
212 |
raftm->am.loop(); |
|
213 |
|
|
214 |
} |
|
215 |
else |
|
216 |
{ |
|
217 |
raftm->am.loop(timeout); |
|
218 |
} |
|
219 |
|
|
211 | 220 |
|
212 | 221 |
NebulaLog::log("RCM",Log::INFO,"Raft Consensus Manager stopped."); |
213 | 222 |
|
Also available in: Unified diff