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

Update append entry methode #20

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Parsifal22
Copy link
Contributor

@Parsifal22 Parsifal22 commented Aug 1, 2024

Now, the _server_append_entries method sends entries. If adding an element fails, it decrements the value of self._next_index[remote_node_index]. If adding the element succeeds, it increments this value.
This way we avoid the case where the new leader rewrites all the logs anew, even if they already exist on the follower.

Additionally, the _serve_append_entries method was modified: new if-conditions were added, and the element removal function was moved from the _append_entries_processing method to this one.

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

Successfully merging this pull request may close these issues.

1 participant