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

Placement rule in SQL isn't compatible with rule checker when using location labels #6637

Closed
rleungx opened this issue Jun 20, 2023 · 1 comment · Fixed by #6633
Closed

Comments

@rleungx
Copy link
Member

rleungx commented Jun 20, 2023

Bug Report

What did you do?

Consider we have a cluster (three zones, each zone has a host, and each host has multiple instances)

zone1 --- host1 --- ap --- (kv1, kv2)
zone2 --- host2 --- ap --- (kv3, kv4)
zone3 --- host3 --- tp --- (kv5, kv6)

If we create the following placement policy:

create placement policy p leader_constraints="[+type=ap]" follower_constraint={+type=ap:1, +type=tp:1}", survival_preferences="[host]";

What did you expect to see?

The region peer won't be distributed in the same host.

What did you see instead?

There will be three rules in PD, and each of them has a location label setting. However, each rule's count is 1, and the location label only takes effect in one rule.

So, we still can find two replicas of a region in a host.

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

master

ti-chi-bot bot pushed a commit that referenced this issue Jun 20, 2023
…e checker (#6633)

close #6637

Signed-off-by: Ryan Leung <rleungx@gmail.com>
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this issue Jun 20, 2023
close tikv#6637

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
rleungx added a commit to rleungx/pd that referenced this issue Jun 20, 2023
…e checker (tikv#6633)

close tikv#6637

Signed-off-by: Ryan Leung <rleungx@gmail.com>
rleungx added a commit to rleungx/pd that referenced this issue Jun 20, 2023
…e checker (tikv#6633)

close tikv#6637

Signed-off-by: Ryan Leung <rleungx@gmail.com>
rleungx added a commit that referenced this issue Jun 20, 2023
#6648)

* schedule: fix location label in placement rule not work well with rule checker (#6633)

close #6637

Signed-off-by: Ryan Leung <rleungx@gmail.com>
rleungx added a commit to rleungx/pd that referenced this issue Jun 21, 2023
…e checker (tikv#6633)

close tikv#6637

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@bufferflies bufferflies reopened this Dec 19, 2023
@bufferflies
Copy link
Contributor

it needs to cherry pick release-6.5 again

ti-chi-bot bot added a commit that referenced this issue Dec 19, 2023
…e checker (#6660) (#6956)

close #6637

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Ryan Leung <rleungx@gmail.com>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
@rleungx rleungx closed this as completed Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

4 participants