-
Notifications
You must be signed in to change notification settings - Fork 160
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
Abstract OpenRaft Core Data Structures into Traits #1278
Comments
👋 Thanks for opening this issue! Get help or engage by:
|
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 24, 2024
This refactoring moves Vote from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: Vote is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `Vote<NodeId>` to `Vote<C> where C: RaftTypeConfig`, for example, change `Vote<u64>` to `Vote<YourTypeConfig>`.
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 24, 2024
This refactoring moves Vote from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: Vote is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `Vote<NodeId>` to `Vote<C> where C: RaftTypeConfig`, for example, change `Vote<u64>` to `Vote<YourTypeConfig>`.
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 24, 2024
This refactoring moves Vote from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: Vote is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `Vote<NodeId>` to `Vote<C> where C: RaftTypeConfig`, for example, change `Vote<u64>` to `Vote<YourTypeConfig>`.
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 24, 2024
This refactoring moves Vote from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: Vote is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `Vote<NodeId>` to `Vote<C> where C: RaftTypeConfig`, for example, change `Vote<u64>` to `Vote<YourTypeConfig>`.
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 24, 2024
This refactoring moves Vote from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: Vote is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `Vote<NodeId>` to `Vote<C> where C: RaftTypeConfig`, for example, change `Vote<u64>` to `Vote<YourTypeConfig>`.
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 24, 2024
This refactoring moves Vote from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: Vote is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `Vote<NodeId>` to `Vote<C> where C: RaftTypeConfig`, for example, change `Vote<u64>` to `Vote<YourTypeConfig>`.
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 24, 2024
This refactoring moves LogId from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: LogId is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `LogId<NodeId>` to `LogId<C> where C: RaftTypeConfig`, for example, change `LogId<u64>` to `LogId<YourTypeConfig>`. - Change trait `RaftLogId<NID: NodeId>` to `RaftLogId<C: RaftTypeConfig>`.
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 24, 2024
This refactoring moves LogId from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: LogId is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `LogId<NodeId>` to `LogId<C> where C: RaftTypeConfig`, for example, change `LogId<u64>` to `LogId<YourTypeConfig>`. - Change trait `RaftLogId<NID: NodeId>` to `RaftLogId<C: RaftTypeConfig>`.
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 24, 2024
This refactoring moves LeaderId from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: LeaderId is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `LeaderId<NodeId>` to `LeaderId<C> where C: RaftTypeConfig`, for example, change `LeaderId<u64>` to `LeaderId<YourTypeConfig>`. - Change `CommittedLeaderId<NodeId>` to `CommittedLeaderId<RaftTypeConfig>`.
drmingdrmer
added a commit
that referenced
this issue
Dec 25, 2024
This refactoring moves Vote from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: #1278 Upgrade tip: Vote is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `Vote<NodeId>` to `Vote<C> where C: RaftTypeConfig`, for example, change `Vote<u64>` to `Vote<YourTypeConfig>`.
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 25, 2024
This refactoring moves LeaderId from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: LeaderId is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `LeaderId<NodeId>` to `LeaderId<C> where C: RaftTypeConfig`, for example, change `LeaderId<u64>` to `LeaderId<YourTypeConfig>`. - Change `CommittedLeaderId<NodeId>` to `CommittedLeaderId<RaftTypeConfig>`.
drmingdrmer
added a commit
that referenced
this issue
Dec 25, 2024
This refactoring moves LogId from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: #1278 Upgrade tip: LogId is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `LogId<NodeId>` to `LogId<C> where C: RaftTypeConfig`, for example, change `LogId<u64>` to `LogId<YourTypeConfig>`. - Change trait `RaftLogId<NID: NodeId>` to `RaftLogId<C: RaftTypeConfig>`.
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 25, 2024
This refactoring moves LeaderId from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: LeaderId is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `LeaderId<NodeId>` to `LeaderId<C> where C: RaftTypeConfig`, for example, change `LeaderId<u64>` to `LeaderId<YourTypeConfig>`. - Change `CommittedLeaderId<NodeId>` to `CommittedLeaderId<RaftTypeConfig>`.
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 25, 2024
This refactoring moves LeaderId from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: LeaderId is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `LeaderId<NodeId>` to `LeaderId<C> where C: RaftTypeConfig`, for example, change `LeaderId<u64>` to `LeaderId<YourTypeConfig>`. - Change `CommittedLeaderId<NodeId>` to `CommittedLeaderId<RaftTypeConfig>`.
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 25, 2024
This refactoring moves LeaderId from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: LeaderId is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `LeaderId<NodeId>` to `LeaderId<C> where C: RaftTypeConfig`, for example, change `LeaderId<u64>` to `LeaderId<YourTypeConfig>`. - Change `CommittedLeaderId<NodeId>` to `CommittedLeaderId<RaftTypeConfig>`.
drmingdrmer
added a commit
to drmingdrmer/openraft
that referenced
this issue
Dec 25, 2024
This refactoring moves LeaderId from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: databendlabs#1278 Upgrade tip: LeaderId is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `LeaderId<NodeId>` to `LeaderId<C> where C: RaftTypeConfig`, for example, change `LeaderId<u64>` to `LeaderId<YourTypeConfig>`. - Change `CommittedLeaderId<NodeId>` to `CommittedLeaderId<RaftTypeConfig>`.
drmingdrmer
added a commit
that referenced
this issue
Dec 25, 2024
This refactoring moves LeaderId from a per-NodeId type to a per-TypeConfig type, to make it consistent with `RaftTypeConfig` usage across the codebase. - Part of: #1278 Upgrade tip: LeaderId is now parameterized by `RaftTypeConfig` instead of `NodeId` - Change `LeaderId<NodeId>` to `LeaderId<C> where C: RaftTypeConfig`, for example, change `LeaderId<u64>` to `LeaderId<YourTypeConfig>`. - Change `CommittedLeaderId<NodeId>` to `CommittedLeaderId<RaftTypeConfig>`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Abstract OpenRaft Core Data Structures into Traits
Goal
Abstract OpenRaft's foundational data structures into traits to provide greater flexibility, allowing users to customize implementations according to their needs.
To enable users to fully define
Entry
types using Protobuf, we need to remove Entry's hard dependencies on other basic types (such asLogId
,Membership
, etc.). This means these basic types also need to be abstracted into traits to achieve complete type customization.Types to Abstract
Basic Types:
Term
LogId
LeaderId
and its associated typeCommittedLeaderId
Composite Types:
Entry
Membership
Vote
Implementation Plan
Term
type into a traitExpected Benefits
The text was updated successfully, but these errors were encountered: