Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

feat: add partition guardian to keep one primary and two secondaries #847

Merged
merged 2 commits into from Jul 8, 2021

Conversation

levy5307
Copy link
Contributor

@levy5307 levy5307 commented Jun 24, 2021

I think some functions in simple_load_balancer have nothing to do with load balancer, such as: cure/collect_replica/construct_replica, etc. So I want to remove them eventually.

In this pull request, A class named with partition_guardian is added, which job is to keep one primary and two secondaries. And move simple_load_balancer::cure into it.

And I will move collect_replica and construct_replica to be a function outside class later.

related issue: #848

@Smityz Smityz added this to In progress in Load balancer via automation Jun 25, 2021
@Smityz Smityz moved this from In progress to Done in Load balancer Jun 25, 2021
@Smityz Smityz moved this from Done to In progress in Load balancer Jun 25, 2021
@Smityz
Copy link
Contributor

Smityz commented Jun 25, 2021

LGTM

hycdong
hycdong previously approved these changes Jun 29, 2021
Copy link
Contributor

@hycdong hycdong left a comment

Choose a reason for hiding this comment

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

I suggestion that you can add an issue in pegasus repo like issue 141 or issue 766 to track your refactor.

@levy5307 levy5307 mentioned this pull request Jun 30, 2021
@levy5307
Copy link
Contributor Author

I suggestion that you can add an issue in pegasus repo like issue 141 or issue 766 to track your refactor.

Done

@foreverneverer foreverneverer changed the title feat: add partition guardian feat: add partition guardian to keep one primary and two secondaries Jul 2, 2021
Copy link
Contributor

@foreverneverer foreverneverer left a comment

Choose a reason for hiding this comment

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

collect_replica actually like util method, and create new class for one method is not appropriate, maybe you can consider the refactor again

@levy5307
Copy link
Contributor Author

levy5307 commented Jul 2, 2021

collect_replica actually like util method, and create new class for one method is not appropriate, maybe you can consider the refactor again

good idea. I will move collect_replica/construct_replica to be a method outside class

@levy5307 levy5307 merged commit 41b5d3d into XiaoMi:master Jul 8, 2021
Load balancer automation moved this from In progress to Done Jul 8, 2021
@levy5307 levy5307 deleted the add-partition-healer branch July 8, 2021 07:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants