Are no-op entries required for Raft to keep data correctness and consistency?

137 views
Skip to first unread message

Keine Neco

unread,
Nov 23, 2020, 10:21:14 PM11/23/20
to raft...@googlegroups.com
Hi all,

We are try to improve our Raft implementation's performance recently. Currently we want to remove the NO-OP entry for each leader step-up.

In my opinion, the NO-OP is used to commit entries generated by last leader faster, or we have to wait the first entry generated by current leader in this term. But removing NO-OP wouldn't caused any data lost or consistency issue.

Why we want to remove NO-OP entry:
1. The entry index is continuous.
2. Reduce leader switch time.
The disadvantages caused by no NO-OP entry:
1. The entries generated by last leader in last term will be committed slower. Because they have to wait the first entry generated by current leader.

Do I described correctly? Any comments are welcome.

Thanks,
Dong.

Oren Eini (Ayende Rahien)

unread,
Nov 24, 2020, 1:43:51 AM11/24/20
to raft...@googlegroups.com
There should be exactly zero cost of the noop commit. The AppendEntry is already going over the wire, so there isn't anything you save here.
And the leader cannot commit anything from previous terms until it committed an entry from its own term.

--
You received this message because you are subscribed to the Google Groups "raft-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to raft-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/raft-dev/CAK8d3PTK-P3V%3DmBK6JTnAqeQX%2BwduNNhoAH0vAYs1dEZCv0OFg%40mail.gmail.com.


--
Oren Eini
CEO   /   Hibernating Rhinos LTD
Skype:  ayenderahien
Support:  sup...@ravendb.net
  
Reply all
Reply to author
Forward
0 new messages