Skip to content

Conversation

@AHBICJ
Copy link

@AHBICJ AHBICJ commented Dec 15, 2025

Description

The MajorityConfig.Describe method is used to visualize commit indexes. The original comment stated that the same index would have the same bar (used for plotting), but the original implementation did not achieve this.

before

committed cfg=(1,2,3) cfgj=(1,4,5) idx=(100,100,99,99,98)
----
         idx
xxx>     100    (id=1)
>        100    (id=2)
x>        99    (id=3)
>         99    (id=4)
>         98    (id=5)

look at 100(id=2) and 99(id=4), I think they should have the same bar, as shown below.

committed cfg=(1,2,3) cfgj=(1,4,5) idx=(100,100,99,99,98)
----
         idx
xxx>     100    (id=1)
xxx>     100    (id=2)
x>        99    (id=3)
x>        99    (id=4)
>         98    (id=5)

What does this RP do

Fix the code so that same idx have the same bar.

Change test data (joint_commit.txt and majority_commit.txt) to match the MajorityConfig.Describe method

Why is this needed?

It's not required, but this PR will make the output more understandable.

I am not sure if these changes have any negative side effects, so I need help from someone who understands them better.
If there are side effects, or if I have misunderstood something due to my limited understanding and made a mistake, please close this PR.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AHBICJ
Once this PR has been reviewed and has the lgtm label, please assign ahrtr for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link

Hi @AHBICJ. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@AHBICJ AHBICJ changed the title makes sure that equal index => equal bar makes sure that equal index => equal bar in quorum/majority.go Describe method Dec 15, 2025
Signed-off-by: yefeng <sun_yf@foxmail.com>
@serathius
Copy link
Member

Without any context, why this is needed, what it solves, don't think it will get any review.

@AHBICJ
Copy link
Author

AHBICJ commented Dec 16, 2025

Without any context, why this is needed, what it solves, don't think it will get any review.

Sorry, I made some edits and added some context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants