Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FSM log entries are applied lazily #90

Open
freeekanayaka opened this issue Aug 8, 2018 · 1 comment
Open

FSM log entries are applied lazily #90

freeekanayaka opened this issue Aug 8, 2018 · 1 comment

Comments

@freeekanayaka
Copy link
Contributor

freeekanayaka commented Aug 8, 2018

This might be considered a issue or simply a design choice, but the fact raft_recv_appendentries_response does not invoke raft_apply_all after updating the commit index and rather relies on the next call of raft_periodic to do that, means that a client call to raft_msg_entry_response_committed might return 1 even if the FSM hasn't yet applied the log entry.

It feels this might cause confusion to users or timing-related issues, see for example the scenario I described in issue #12 of ticketd.

Please let me know if my reading is correct. Thanks!

@jiguanglizipao
Copy link

jiguanglizipao commented Sep 18, 2018

Ticketd will wait the raft_msg_entry_response_committed return 1. It means the __raft_applylog function has been called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants