Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Update append entry methode - #20

Open
Parsifal22 wants to merge 7 commits into
OpenCyphal-Garage:mainfrom
Parsifal22:update-append-entry-methode
Open

Update append entry methode#20
Parsifal22 wants to merge 7 commits into
OpenCyphal-Garage:mainfrom
Parsifal22:update-append-entry-methode

Conversation

@Parsifal22

@Parsifal22 Parsifal22 commented Aug 1, 2024

Copy link
Copy Markdown
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant