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 sm_commit_index_ after state_machine commit is called. #93

Merged
merged 2 commits into from
Jan 14, 2020

Conversation

shigui1989
Copy link
Contributor

No description provided.

Copy link
Contributor

@greensky00 greensky00 left a comment

Choose a reason for hiding this comment

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

Let me address my comments and then merge. Thanks.

@@ -572,8 +572,8 @@ protected:
void commit_in_bg();
void append_entries_in_bg();

void commit_app_log(ptr<log_entry>& le, bool need_to_handle_commit_elem);
void commit_conf(ptr<log_entry>& le);
void commit_app_log(ptr<log_entry>& le, bool need_to_handle_commit_elem, ulong sm_committing_index);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't exceed 90 chars per line.

}

sm_commit_index_ = sm_committing_index;
Copy link
Contributor

Choose a reason for hiding this comment

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

To be safe, we should use compare-and-swap here.

@greensky00 greensky00 merged commit adc7356 into eBay:master Jan 14, 2020
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