chiselstore
chiselstore copied to clipboard
Enforce exactly-once semantics
If a leader crashes after applying a command to the state machine, but before responding to a client, the client will re-try the command, which breaks exactly-once semantics. One way to fix this is to make the client include an ID for every command. A leader can then check for the ID in its log before applying a command to its state machine to detect stale commands.