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

Follower stores accepted log id #747

Closed
drmingdrmer opened this issue Apr 3, 2023 · 1 comment · Fixed by #748
Closed

Follower stores accepted log id #747

drmingdrmer opened this issue Apr 3, 2023 · 1 comment · Fixed by #748
Assignees

Comments

@drmingdrmer
Copy link
Member

Let a follower stores the last log id that is synchronized by the leader. (LeaderId, Option<LogId>);

This field is only stored in memory, the condition to commit does not change, and it is not considered when handling vote-request.

Why

When a leader replicates committed log id to a follower, the follower can only commit logs that are replicated by this leader.

@drmingdrmer drmingdrmer self-assigned this Apr 3, 2023
@github-actions
Copy link

github-actions bot commented Apr 3, 2023

👋 Thanks for opening this issue!

Get help or engage by:

  • /help : to print help messages.
  • /assignme : to assign this issue to you.

drmingdrmer added a commit to drmingdrmer/openraft that referenced this issue Apr 3, 2023
A follower stores the ID of the latest log that has been synchronized by
the leader, represented as `(LeaderId, Option<LogId>)`.
This information is only kept in memory and is not taken into account
when processing vote requests or determining the commit condition.

The reason for storing this information is to allow followers to commit
only those logs that have been replicated by their current leader.

- Fix: datafuselabs#747
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 a pull request may close this issue.

1 participant