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

Feature: Abstract Term #1284

Merged
merged 1 commit into from
Dec 26, 2024
Merged

Feature: Abstract Term #1284

merged 1 commit into from
Dec 26, 2024

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Dec 26, 2024

Changelog

Feature: Abstract Term

Add associated type Term: RaftTerm to RaftTypeConfig so that
application can customize the data type for Raft term.

By default Term is u64 and user application does not need to modify
to upgrade.


This change is Reviewable

SteveLauC
SteveLauC previously approved these changes Dec 26, 2024
Copy link
Collaborator

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

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

Looks good:)

:lgtm:

Reviewed 14 of 16 files at r1, all commit messages.
Reviewable status: 14 of 16 files reviewed, all discussions resolved (waiting on @schreter)

/// such as old leaders. It must be totally ordered and monotonically increasing.
///
/// Common implementations are provided for standard integer types like `u64`, `i64` etc.
pub trait RaftTerm
Copy link
Collaborator

@SteveLauC SteveLauC Dec 26, 2024

Choose a reason for hiding this comment

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

Module vote is private, so this trait is private as well, this is the reason why the lint CI failed

mod vote;

Add associated type `Term: RaftTerm` to `RaftTypeConfig` so that
application can customize the data type for Raft `term`.

By default `Term` is `u64` and user application does not need to modify
to upgrade.

- Part of databendlabs#1278
@drmingdrmer drmingdrmer merged commit 636664d into databendlabs:main Dec 26, 2024
31 of 32 checks passed
@drmingdrmer drmingdrmer deleted the 175-term branch December 26, 2024 15:17
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.

3 participants