-
Notifications
You must be signed in to change notification settings - Fork 17
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
Found bugs mainly caused by snapshot #49
Comments
trying to understand the bugs before I dive into the PR as its not against our code.
I think perhaps it should be raft_get_commit_idx(me_) not current_idx snapshots should be compared to commit idx, not current idx. that might solve the problem?
thoughts on my analysis / understanding of the issues as of now? will try to dig into the PR to see if it gives me further insight (problem is, that it seems to cover a lot of issues that make it difficult to tease out the individual issues) |
to go back to #1. in raft_send_appendentries we do
the only way for prev_log_idx to be 0, if we have literally never sent any entries to it. Basically, I think #1 is not a bug, just if it happens on a non empty log, the user is using the library incorrectly and there's little we can do. so in summary I just see a simple fix for #4 (ignore error) and #3 perhaps we can optimize cases where follower snapshot. With that said, I'm not sure its really neccessary, what will happen is that we will just return an error, give the leader our current_idx and it will then reply to us with the correct data. I'm unsure there's significant value in optimizing this case, but am willing to be told we should. |
I think your understanding is correct. I will explain more clearly.
|
|
@tangruize, in the past ~2y we've made lots of refactoring and stabilization to this repo. In case you think these issues are still relevant please re-open. |
Hello! I found some issues that may cause catastrophic consequences. I created a PR #118. Seems that some issues have been fixed. Here are the issues that have not been fixed. They may be bugs or improper use of the library.
I would be happy to help. And I am looking forward to your reply!
The text was updated successfully, but these errors were encountered: