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

Leader replies with ReplicationFailed based on entity's last applied index #161

Merged
merged 10 commits into from
Jul 15, 2022

Conversation

xirc
Copy link
Contributor

@xirc xirc commented Jul 13, 2022

Closes #153

An Entity sends a Replicate message containing its lastAppliedLogEntryIndex. A leader will reply with a ReplicaionFaield message if the Leader's Raft log (ReplicatedLog) contains an entry that satisfies all of the following conditions:

  • The entry is for the entity (LogEntry.event.entityId is equal to Replicate.entityId)
  • The index of the entry is greater than lastAppliedLogEntryIndex of the Replicate message.

@xirc xirc force-pushed the replication-failure-based-on-entitys-applied-index branch from 8a7ee3f to e2ccc25 Compare July 13, 2022 06:34
@xirc xirc marked this pull request as ready for review July 14, 2022 00:51
@xirc xirc requested a review from negokaz July 14, 2022 00:52
Copy link
Contributor

@negokaz negokaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! LGTM 👍

@negokaz negokaz enabled auto-merge July 14, 2022 12:37
@negokaz negokaz merged commit 695c697 into master Jul 15, 2022
@negokaz negokaz deleted the replication-failure-based-on-entitys-applied-index branch July 15, 2022 00:30
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.

Leader cannot reply to an entity with a ReplicationFailed message in some cases
2 participants