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: Consolidate RaftMetrics type parameters into C #1058

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Mar 15, 2024

Changelog

Change: Consolidate RaftMetrics type parameters into C

The RaftMetrics type, along with related metric types, previously used
separate type parameters (NID, N) which have now been replaced with
a single generic parameter C bound by RaftTypeConfig. This
modification simplifies the type signatures and usage.

Upgrade tip:

To adapt to this change, update the metric-related type parameters from
separate NID and N to the single generic C constrained by
RaftTypeConfig:

RaftMetrics<NID, N>         --> RaftMetrics<C>
RaftDataMetrics<NID>        --> RaftDataMetrics<C>
RaftServerMetrics<NID, NID> --> RaftServerMetrics<C>
Metric<NID>                 --> Metric<C>
Wait<NID, N, A>             --> Wait<C>

This change is Reviewable

ariesdevil
ariesdevil previously approved these changes Mar 15, 2024
The `RaftMetrics` type, along with related metric types, previously used
separate type parameters (`NID`, `N`) which have now been replaced with
a single generic parameter `C` bound by `RaftTypeConfig`. This
modification simplifies the type signatures and usage.

Upgrade tip:

To adapt to this change, update the metric-related type parameters from
separate `NID` and `N` to the single generic `C` constrained by
`RaftTypeConfig`:

```rust
RaftMetrics<NID, N>         --> RaftMetrics<C>
RaftDataMetrics<NID>        --> RaftDataMetrics<C>
RaftServerMetrics<NID, NID> --> RaftServerMetrics<C>
Metric<NID>                 --> Metric<C>
Wait<NID, N, A>             --> Wait<C>
```
@drmingdrmer drmingdrmer merged commit 717ed63 into databendlabs:main Mar 16, 2024
30 checks passed
@drmingdrmer drmingdrmer deleted the 35-raft-metrics branch March 16, 2024 01:28
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.

2 participants