mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 16:01:37 +08:00
Raft tracepoint at election completion
This commit is contained in:
@@ -165,6 +165,7 @@ class RaftCore : private TimerBase
|
|||||||
|
|
||||||
if (num_votes_received_in_this_campaign_ > 0)
|
if (num_votes_received_in_this_campaign_ > 0)
|
||||||
{
|
{
|
||||||
|
trace(TraceRaftElectionComplete, num_votes_received_in_this_campaign_);
|
||||||
const bool won = num_votes_received_in_this_campaign_ >= cluster_.getQuorumSize();
|
const bool won = num_votes_received_in_this_campaign_ >= cluster_.getQuorumSize();
|
||||||
|
|
||||||
UAVCAN_TRACE("dynamic_node_id_server::distributed::RaftCore", "Election complete, won: %d", int(won));
|
UAVCAN_TRACE("dynamic_node_id_server::distributed::RaftCore", "Election complete, won: %d", int(won));
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ enum TraceCode
|
|||||||
TraceRaftNewEntryCommitted, // new commit index value
|
TraceRaftNewEntryCommitted, // new commit index value
|
||||||
// 25
|
// 25
|
||||||
TraceRaftAppendEntriesCallFailure, // error code (may be negated)
|
TraceRaftAppendEntriesCallFailure, // error code (may be negated)
|
||||||
Trace0,
|
TraceRaftElectionComplete, // number of votes collected
|
||||||
Trace1,
|
Trace1,
|
||||||
Trace2,
|
Trace2,
|
||||||
Trace3,
|
Trace3,
|
||||||
@@ -126,7 +126,7 @@ public:
|
|||||||
"RaftNewerTermInResponse",
|
"RaftNewerTermInResponse",
|
||||||
"RaftNewEntryCommitted",
|
"RaftNewEntryCommitted",
|
||||||
"RaftAppendEntriesCallFailure",
|
"RaftAppendEntriesCallFailure",
|
||||||
"",
|
"RaftElectionComplete",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
@@ -138,7 +138,7 @@ public:
|
|||||||
"AllocationRequestAccepted",
|
"AllocationRequestAccepted",
|
||||||
"AllocationExchangeComplete",
|
"AllocationExchangeComplete",
|
||||||
"AllocationResponse",
|
"AllocationResponse",
|
||||||
"",
|
"AllocationActivity",
|
||||||
"",
|
"",
|
||||||
"DiscoveryNewNodeFound",
|
"DiscoveryNewNodeFound",
|
||||||
"DiscoveryCommitCacheUpdated",
|
"DiscoveryCommitCacheUpdated",
|
||||||
|
|||||||
Reference in New Issue
Block a user