8000 refactor: remove simple_load_balancer by levy5307 · Pull Request #899 · XiaoMi/rdsn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 23, 2022. It is now read-only.

refactor: remove simple_load_balancer #899

Merged
merged 9 commits into from
Sep 2, 2021

Conversation

levy5307
Copy link
Contributor
@levy5307 levy5307 commented Sep 1, 2021

remove simple_load_balancer, and make the interface server_load_balancer simple.

Manual Test

  1. start onebox with 5 replica servers and 3 meta server2
  2. create a table name with "temp", we can see create table process is ok.
  3. kill 3 replica servers
  4. use ddd_diagnose to see the ddd partitions
Total 1 ddd partitions:

(1) 2.3
    config: ballot(6), last_committed(8)
    ----
    dropped[0]: node(10.231.57.100:34801), drop_time(2021-09-01 18:56:19.670), alive(false), collected(false), ballot(-1), last_committed(-1), last_prepared(-1)
    dropped[1]: node(10.231.57.100:34802), drop_time(2021-09-01 18:56:29.673), alive(false), collected(false), ballot(-1), last_committed(-1), last_prepared(-1)  <== the secondary latest
    dropped[2]: node(10.231.57.100:34803), drop_time(2021-09-01 18:56:43.560), alive(false), collected(false), ballot(-1), last_committed(-1), last_prepared(-1)  <== the latest
    ----
    last_drops[0]: node(10.231.57.100:34801)
    last_drops[1]: node(10.231.57.100:34802)  <== the secondary latest
    last_drops[2]: node(10.231.57.100:34803)  <== the latest
    ----
    ddd_reason: the last dropped node(10.231.57.100:34803) haven't come back yet

Proposed count: 0/1

Diagnose ddd done.

"partition_guardian_type",
"partition_guardian",
"partition guardian provider");

Copy link
Contributor

Choose a reason for hiding this comment

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

One of the partition_guardian_type is "partition_guardian", does it have another type?

Copy link
Contributor Author
@levy5307 levy5307 Sep 2, 2021

Choose a reason for hiding this comment

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

There is another type name dummy_partition_guardian in unit test.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, expecting your next pr to add those configuration in config files and adding comments for it.

@hycdong hycdong added the type/config-change PR that made modification on configs, which should be noted in release note. label Sep 2, 2021
pc_status ps = pc_status::invalid;
node_state *ns;

configuration_proposal_action act;
while (ps != pc_status::healthy) {
ps = lb->cure({&apps, &nodes}, pc.pid, act);
ps = guardian.cure({&apps, &nodes}, pc.pid, act);
Copy link
Contributor

Choose a reason for hiding this comment

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

The unit test is guardian test, but not the file name balancer_validator mean, you can also separate it from this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so. It`s a function used in balancer_validator, which used to test greedy load balancer

@hycdong hycdong merged commit 3bcff61 into XiaoMi:master Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component/load-balancer type/config-change PR that made modification on configs, which should be noted in release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0