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

Change: change LeaderId<NID:NodeId> to LeaderId<C:RaftTypeConfig> #1282

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Dec 25, 2024

Changelog

Change: change LeaderId<NID:NodeId> to LeaderId<C:RaftTypeConfig>

This refactoring moves LeaderId from a per-NodeId type to a per-TypeConfig type,
to make it consistent with RaftTypeConfig usage across the codebase.

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>.

Change: change LogId<NID:NodeId> to LogId<C:RaftTypeConfig>

This refactoring moves LogId from a per-NodeId type to a per-TypeConfig type,
to make it consistent with RaftTypeConfig usage across the codebase.

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>.


This change is Reviewable

@drmingdrmer drmingdrmer force-pushed the 165-leader-id-c branch 3 times, most recently from 62c9b2e to 77339a9 Compare December 25, 2024 14:41
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 drmingdrmer merged commit 429a9fd into databendlabs:main Dec 25, 2024
31 checks passed
@drmingdrmer drmingdrmer deleted the 165-leader-id-c branch December 25, 2024 15:51
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.

1 participant