Hi, @wenweihu86 , I think there is an issue with the condition here. It should be raftNode.getLeaderId() != 0, because the default value of the leaderId field in RaftNode is 0, and throughout the entire project, the leaderId field has never been set to -1.
|
if (raftNode.getLeaderId() != -1 |
Only the leaderId field in the ExampleServiceImpl class has a default value of -1.
|
private int leaderId = -1; |