mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 14:53:34 +08:00
Raft active state extension removed
This commit is contained in:
@@ -3,16 +3,25 @@
|
||||
# Please refer to the specification for details.
|
||||
#
|
||||
|
||||
uint16 DEFAULT_REQUEST_TIMEOUT_MS = 200
|
||||
|
||||
uint16 DEFAULT_BASE_ELECTION_TIMEOUT_MS = 1600 # request timeout * (max cluster size - 1) * 2 requests
|
||||
#
|
||||
# Given min election timeout and cluster size, the maximum request interval can be derived as follows:
|
||||
# max request interval = (min election timeout) / 2 requests / (cluster size - 1)
|
||||
# Obviously, request interval can be lower than that if needed, but not higher.
|
||||
#
|
||||
# Real timeout is randomized in the range (MIN, MAX].
|
||||
#
|
||||
uint16 MIN_ELECTION_TIMEOUT_MS = 4000
|
||||
uint16 MAX_ELECTION_TIMEOUT_MS = 6000
|
||||
|
||||
uint32 term
|
||||
uint32 prev_log_term
|
||||
uint8 prev_log_index
|
||||
uint8 leader_commit
|
||||
|
||||
# Full replication: 127 requests * 0.2 sec interval * 4 followers * 2 trips of next_index value ~ 3.5 min
|
||||
#
|
||||
# Worst-case replication time can be computed as:
|
||||
# worst replication time = (127 log entries) * (2 trips of next_index) * (cluster size - 1) * (request interval)
|
||||
#
|
||||
Entry[<=1] entries
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user