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

fix #34, record abandoned reason for conflicting entry logs #36

Merged
merged 2 commits into from
Dec 21, 2021

Conversation

suzaku
Copy link
Contributor

@suzaku suzaku commented Dec 19, 2021

No description provided.

@andreev-io andreev-io self-requested a review December 20, 2021 08:13
@andreev-io andreev-io self-assigned this Dec 20, 2021
Copy link
Owner

@andreev-io andreev-io left a comment

Choose a reason for hiding this comment

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

The functional changes look good. I think we need to work on the naming. Any ideas other than ConflictingEntry? The word Entry in there is redundant.

Also, let's reword the explanatory comment in the enum and use triple slash /// instead of // in TransitionAbandonedReason comments so that they show up in rust docs.

@@ -26,6 +26,10 @@ pub enum TransitionAbandonedReason {
// NotLeader transitions have been abandoned because the replica is not
// the cluster leader.
NotLeader,

// ConflictingEntry entry logs in followers that are inconsistent with the
// leader's.
Copy link
Owner

@andreev-io andreev-io Dec 20, 2021

Choose a reason for hiding this comment

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

_name_ uncommitted transitions are abandoned because they don't match the consensus achieved by the majority of the cluster.

@suzaku
Copy link
Contributor Author

suzaku commented Dec 20, 2021

The functional changes look good. I think we need to work on the naming. Any ideas other than ConflictingEntry? The word Entry in there is redundant.

Also, let's reword the explanatory comment in the enum and use triple slash /// instead of // in TransitionAbandonedReason comments so that they show up in rust docs.

How about ConflictWithLeader?

@andreev-io
Copy link
Owner

ConflictWithLeader is perfect! Please update the comment as well.

@suzaku
Copy link
Contributor Author

suzaku commented Dec 20, 2021

@andreev-io Fixed.

@andreev-io andreev-io merged commit 20976ce into andreev-io:master Dec 21, 2021
@andreev-io
Copy link
Owner

Thank you for your contributions @suzaku!

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.

2 participants