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

Remove RaftEvent::Repilcate::entry. Replace it with log id. #42

Closed
drmingdrmer opened this issue Jan 2, 2022 · 5 comments · Fixed by #51
Closed

Remove RaftEvent::Repilcate::entry. Replace it with log id. #42

drmingdrmer opened this issue Jan 2, 2022 · 5 comments · Fixed by #51
Assignees
Labels
C-docs Category: documentation good first issue Good for newcomers improvement

Comments

@drmingdrmer
Copy link
Member

Remove RaftEvent::Repilcate::entry. Replace it with log id.

RaftCore does not need to send an entry, but just a log id is quite enough.
Since a ReplicationStream always reads log entries from a RaftStorage impl.

pub(crate) enum RaftEvent<D: AppData> {
Replicate {
/// The new entry which needs to be replicated.
///
/// This entry will always be the most recent entry to have been appended to the log, so its
/// index is the new last_log_index value.
entry: Arc<Entry<D>>,
/// The index of the highest log entry which is known to be committed in the cluster.
committed: LogId,
},

@github-actions
Copy link

github-actions bot commented Jan 2, 2022

👋 Thanks for opening this issue!

Get help or engage by:

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

@drmingdrmer drmingdrmer added C-docs Category: documentation good first issue Good for newcomers improvement labels Jan 2, 2022
@YangKian
Copy link
Contributor

YangKian commented Jan 3, 2022

Hi, can I take this assignment? I would like to try it.

@drmingdrmer
Copy link
Member Author

Hi, can I take this assignment? I would like to try it.

Of course man!

/help

@github-actions
Copy link

github-actions bot commented Jan 3, 2022

Get help or engage by:

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

@YangKian
Copy link
Contributor

YangKian commented Jan 3, 2022

/assignme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-docs Category: documentation good first issue Good for newcomers improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants