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

Confused about project2B's impl peer storage "PeerStorage.SaveReadyState" description #330

Open
BaymaxHWY opened this issue Nov 30, 2021 · 1 comment

Comments

@BaymaxHWY
Copy link

The original description is "To append log entries, simply save all log entries at raft.Ready.Entries to raftdb and delete any previously appended log entries which will never be committed. Also, update the peer storage’s RaftLocalState and save it to raftdb."

what log is "delete any previously appended log entries which will never be committed" ?
I looked at previous implementations of TIKV, the deleted log entries is the index between in [raft.Ready.Entries first index , the peer.raftState.LastIndex], why delete these ? writes to the new entries should override the original log, maybe just delete the log which index between in [raft.Ready.Entries last index, the peer.raftState.LastIndex]

@BaymaxHWY
Copy link
Author

I'm blind,your impl is delete the log which index between in [raft.Ready.Entries last index, the peer.raftState.LastIndex], sorry, but I would suggest that this logical description be a little bit more detailed, right?

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

1 participant