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

Alter placement policy cannot update the relative ranges policy. #51712

Closed
nolouch opened this issue Mar 12, 2024 · 3 comments · Fixed by #52254
Closed

Alter placement policy cannot update the relative ranges policy. #51712

nolouch opened this issue Mar 12, 2024 · 3 comments · Fixed by #52254
Assignees
Labels
affects-7.5 affects-8.1 component/pd report/community The community has encountered this bug. severity/moderate type/bug The issue is confirmed as a bug.

Comments

@nolouch
Copy link
Member

nolouch commented Mar 12, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE PLACEMENT POLICY `evict_sata_dw` CONSTRAINTS="[-disk=sata-new, -disk=dw-ssd]"
ALTER RANGE global PLACEMENT POLICY `evict_sata_dw`.
ALTER PLACEMENT POLICY evict_sata_dw CONSTRAINTS="[-disk=sata-new, -disk=dw-ssd]" SURVIVAL_PREFERENCES="[zone, dc, host]"

2. What did you expect to see? (Required)

global rule will update the location labels.

3. What did you see instead (Required)

no update

root@prod-dw-tipd6-f001:~# tiup ctl:v7.5.1 pd config placement-rules rule-bundle get pd
Starting component ctl: /root/.tiup/components/ctl/v7.5.1/ctl pd config placement-rules rule-bundle get pd
{
  "group_id": "pd",
  "group_index": 0,
  "group_override": false,
  "rules": [
    {
      "group_id": "pd",
      "id": "default",
      "start_key": "",
      "end_key": "",
      "role": "voter",
      "is_witness": false,
      "count": 3,
      "location_labels": [
        "zone",
        "dc",
        "host"
      ],
      "version": 1
    }
  ]
}

root@prod-dw-tipd6-f001:~# tiup ctl:v7.5.1 pd config placement-rules rule-bundle get TiDB_GLOBAL
Starting component ctl: /root/.tiup/components/ctl/v7.5.1/ctl pd config placement-rules rule-bundle get TiDB_GLOBAL
{
  "group_id": "TiDB_GLOBAL",
  "group_index": 20,
  "group_override": true,
  "rules": [
    {
      "group_id": "TiDB_GLOBAL",
      "id": "evict_sata_dw_rule_0",
      "start_key": "",
      "end_key": "",
      "role": "voter",
      "is_witness": false,
      "count": 3,
      "label_constraints": [
        {
          "key": "disk",
          "op": "notIn",
          "values": [
            "sata-new"
          ]
        },
        {
          "key": "disk",
          "op": "notIn",
          "values": [
            "dw-ssd"
          ]
        },
        {
          "key": "engine",
          "op": "notIn",
          "values": [
            "tiflash"
          ]
        }
      ],
      "create_timestamp": 1710164464
    }

need ALTER RANGE global PLACEMENT POLICY evict_sata_dw. again then update.

4. What is your TiDB version? (Required)

7.5.1

@nolouch nolouch added type/bug The issue is confirmed as a bug. severity/moderate affects-7.5 labels Mar 12, 2024
@jiyfhust
Copy link
Contributor

/assgin

@jiyfhust
Copy link
Contributor

/assign

@seiya-annie
Copy link

/found community

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 affects-8.1 component/pd report/community The community has encountered this bug. severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants