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

pd leader is not balance when dr-auto-sync is enabled #6195

Closed
glorv opened this issue Mar 21, 2023 · 1 comment · Fixed by #6200
Closed

pd leader is not balance when dr-auto-sync is enabled #6195

glorv opened this issue Mar 21, 2023 · 1 comment · Fixed by #6200
Assignees
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.0 severity/moderate type/bug The issue is confirmed as a bug.

Comments

@glorv
Copy link
Contributor

glorv commented Mar 21, 2023

Bug Report

What did you do?

Deploy a pd cluster with the recommanded topology of dr-auto-sync and enable dr-auto-sync.
The placement-rules is:

[
  {
    "group_id": "pd",
    "group_index": 0,
    "group_override": false,
    "rules": [
      {
        "group_id": "pd",
        "id": "lg1",
        "start_key": "",
        "end_key": "",
        "role": "voter",
        "count": 1,
        "location_labels": ["dc", "logic", "host"],
        "label_constraints": [{"key": "logic", "op": "in", "values": ["lg1"]}]
      },
      {
        "group_id": "pd",
        "id": "lg2",
        "start_key": "",
        "end_key": "",
        "role": "voter",
        "count": 1,
        "location_labels": ["dc", "logic", "host"],
        "label_constraints": [{"key": "logic", "op": "in", "values": ["lg2"]}]
      },
      {
        "group_id": "pd",
        "id": "lg3",
        "start_key": "",
        "end_key": "",
        "role": "voter",
        "count": 1,
        "location_labels": ["dc", "logic", "host"],
        "label_constraints": [{"key": "logic", "op": "in", "values": ["lg3"]}]
      },
      {
        "group_id": "pd",
        "id": "lg4",
        "start_key": "",
        "end_key": "",
        "role": "learner",
        "count": 1,
        "location_labels": ["dc", "logic", "host"],
        "label_constraints": [{"key": "logic", "op": "in", "values": ["lg4"]}]
      }
    ]
  }
]

What did you expect to see?

After the cluster is inited, all leaders should be balance across all primary stores.

What did you see instead?

The leader is not balanced.

What version of PD are you using (pd-server -V)?

v6.5.0

a295f3ed-ce04-405a-9355-8443a941ae1e
321f39d1-c580-42d8-986e-11bdba4c6eb0

The MatchLabelsConstrains is not correct for transfer-leader-operator.

@glorv glorv added the type/bug The issue is confirmed as a bug. label Mar 21, 2023
@bufferflies bufferflies self-assigned this Mar 21, 2023
@bufferflies bufferflies added affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.0 labels Mar 21, 2023
@bufferflies
Copy link
Contributor

yes, the replace should support the exchange peer if their's rule role is same.

ti-chi-bot added a commit that referenced this issue Mar 21, 2023
close #6195

1. role can be transfer when their's rule role is same.

Signed-off-by: bufferflies <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this issue Mar 21, 2023
ti-chi-bot added a commit that referenced this issue Mar 21, 2023
close #6195, ref #6200

1. role can be transfer when their's rule role is same.

Signed-off-by: bufferflies <[email protected]>

Co-authored-by: bufferflies <[email protected]>
Co-authored-by: lhy1024 <[email protected]>
CabinfeverB pushed a commit to ti-chi-bot/pd that referenced this issue Mar 22, 2023
…ikv#6203)

close tikv#6195, ref tikv#6200

1. role can be transfer when their's rule role is same.

Signed-off-by: bufferflies <[email protected]>

Co-authored-by: bufferflies <[email protected]>
Co-authored-by: lhy1024 <[email protected]>
Signed-off-by: Cabinfever_B <[email protected]>
CabinfeverB pushed a commit to ti-chi-bot/pd that referenced this issue Mar 22, 2023
…ikv#6203)

close tikv#6195, ref tikv#6200

1. role can be transfer when their's rule role is same.

Signed-off-by: bufferflies <[email protected]>

Co-authored-by: bufferflies <[email protected]>
Co-authored-by: lhy1024 <[email protected]>
Signed-off-by: Cabinfever_B <[email protected]>
ti-chi-bot added a commit that referenced this issue Mar 23, 2023
close #6195, ref #6200

1. role can be transfer when their's rule role is same.

Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: bufferflies <[email protected]>

Co-authored-by: buffer <[email protected]>
Co-authored-by: bufferflies <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.0 severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants