Skip to content

Feature: Abstract Term#1284

Merged
drmingdrmer merged 1 commit intodatabendlabs:mainfrom
drmingdrmer:175-term
Dec 26, 2024
Merged

Feature: Abstract Term#1284
drmingdrmer merged 1 commit intodatabendlabs:mainfrom
drmingdrmer:175-term

Conversation

@drmingdrmer
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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