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

fix: Karapace instance primary eligiblity added to group protocol #508

Merged
merged 2 commits into from
Dec 12, 2022

Conversation

jjaakola-aiven
Copy link
Contributor

About this change - What it does

Group coordinator leader is selected from the whole set of members of the group. This can also be member that is not primary eligible. This change corrects the group protocol data and Karapace primary selection to use the actual instance configured primary eligibility. The code before used the primary eligibility of the selected group leader which can be false.

@jjaakola-aiven jjaakola-aiven requested review from a team as code owners December 9, 2022 14:47
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 9, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9b6cbbc
Status: ✅  Deploy successful!
Preview URL: https://66b28782.karapace.pages.dev
Branch Preview URL: https://jjaakola-aiven-fix-primary-e.karapace.pages.dev

View logs

Copy link
Contributor

@tvainika tvainika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see that this is kind of minimal changes needed to fix the issue found. However what about considering also method naming and signatures while we go? I find it confusing that we have get_identity and get_identity_url which I mix with each other, or is it just me? Second note is about type signature (return type) of get_identity_url: It has two modes with one returning json and another dict. What about separating those cases so that one can add valid return type annotation?

Group coordinator leader is selected from the whole set of members
of the group. This can also be member that is not primary eligible.
This change corrects the group protocol data and Karapace primary
selection to use the actual instance configured primary eligibility.
The code before used the primary eligibility of the selected group
leader which can be false.
@jjaakola-aiven jjaakola-aiven force-pushed the jjaakola-aiven-fix-primary-eligibility-assigment branch from 0c53b96 to f9fefcc Compare December 9, 2022 15:24
@jjaakola-aiven
Copy link
Contributor Author

jjaakola-aiven commented Dec 9, 2022

Removed the dual-return-type.
Changed the naming to get_member_url and get_member_configuration.

@jjaakola-aiven
Copy link
Contributor Author

Added also typing, not perfect some casts left. The configuration should be moved to dataclass from plain dictionary/JSON.

@tvainika tvainika merged commit 6482075 into main Dec 12, 2022
@tvainika tvainika deleted the jjaakola-aiven-fix-primary-eligibility-assigment branch December 12, 2022 06:08
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