Icysandwich

Results 9 comments of Icysandwich

Also, data at MNIST:40, p_betas at X2P.scala:34 can be cached. dataset at MNIST.scala:25 should be uncached after line 45, since it is not used any more. These change can improve...

But the log is written after the node becomes follower from candidate. Thus, in a concurrent scenario, Node 4 can request Node 2 and Node 3 right after they become...

Okay, I see. Thanks for your further explanation. You mean the leader writes NoOp in this task, right? https://github.com/xnnyygn/xraft/blob/3442abcf0c54d631e10d44df577771d27138de74/xraft-core/src/main/java/in/xnnyygn/xraft/core/node/NodeImpl.java#L561 And in this task the leader will send AppendEntriesRpc requests to...

Sorry for my misunderstanding. Now I've got the thread model. Thanks again for your explanation. I seemingly find out a possible buggy scenario, which can occur when using `FileLog` instead...

A network partition is not essential. When `AppendEntriesRpc` requests are delayed, the situation occurs. And Raft should be tolerant to message delay faults.

Sorry for my misleading expression. I agree that in my scenario Node 2 cannot response twice for only one request. But for me it is still possible that Node 1...

I dont think this simple fix can help solve the problem, since lastTermVoted cant still be used to distinguish which node the vote is from. I've created a PR with...

I find another scenario to prove **_why it is important to distinguish where votes from_**. PLZ check the test case testVoteCanceled in the lastest commit.

Yep. The standard Raft will persist important internal states, i.e., votedFor and term, on disk when they are changed, so that a node could remember his choice even after restart....