I have not read the Raft implementation(s) code - specifically for LogCabin and have the following question.
At a high level, in Raft:
1. Leader "commits" its log once replicated to (majority) of followers
2. Leader then executes the log in its state machine - if the state machine is "Application A" (App-A), then App-A applies the operations in the log. If App-A is a database (DB), or a KV store, and the operations in the log specify a sequence of DB, KV store, etc. operations (e.g., a transaction), then if all goes well with the DB instance it successfully carries out the transaction (e.g., commits it etc).
3. Followers now have the same operation in their logs, and will each begin (I assume) to have their state machine (App-A instance) apply the operations in their log (e.g., a DB transaction).
Question:
For the client ("Raft/App-A" client - I am assuming a properly written client) I am assuming it knows the Leader, Raft Term, state of the Leader's Raft log commit, etc. (and in case there there is a new election, Leader has or is going through Leader election, change, ...) it can properly react. The question is: is the client also aware of the "state" of the state machine (App-A) - for example, does it know whether the DB transactions have been successfully committed in the Leader and Followers?
More generally, in Raft implementations (specifically LogCabin) beyond handling Raft (state machine, in this case App-A) logs, is there any coordination between what happens after App-A applies the logs to monitor the "state" of App-A (among Leader and Followers), and between the server (Raft Leader, follower, ... - and, the App-A Leader and follower instances) and the client.
The reason to pose this question is that ultimately the client needs to know the "state" of the application (App-A) and within the consensus algorithm it seems the Leader (and followers) should also know something about this state (on their respective state machines). Is this coordination implemented in LogCabin or other Raft implementations, or is it assumed it is the responsibility of implementer (user) of the Raft protocol (including client-side logic).
Hope the question is not too convoluted and really appreciate a response.