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

update labels API not work for some modules #51427

Closed
you06 opened this issue Feb 29, 2024 · 1 comment · Fixed by #51451
Closed

update labels API not work for some modules #51427

you06 opened this issue Feb 29, 2024 · 1 comment · Fixed by #51451
Labels
affects-6.5 affects-7.1 affects-7.5 report/customer Customers have encountered this bug. severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@you06
Copy link
Contributor

you06 commented Feb 29, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. start a tidb server
  2. check there are no labels
curl 127.0.0.1:10080/info/all
{
 "servers_num": 1,
 "owner_id": "d807298d-d747-4ded-b896-480beceed704",
 "is_all_server_version_consistent": true,
 "all_servers_info": {
  "d807298d-d747-4ded-b896-480beceed704": {
   "version": "8.0.11-TiDB-v8.0.0-alpha-208-gf0a26dd2a3",
   "git_hash": "f0a26dd2a36d688d9a691302edb5429d1f15e351",
   "ddl_id": "d807298d-d747-4ded-b896-480beceed704",
   "ip": "127.0.0.1",
   "listening_port": 4000,
   "status_port": 10080,
   "lease": "45s",
   "binlog_status": "Off",
   "start_timestamp": 1709205226,
   "labels": {},
   "server_id": 914
  }
 }
}
  1. update labels
curl -X POST -d "{\"foo\": \"bar\"}" 127.0.0.1:10080/labels
{
 "foo": "bar"
}%

Also check the log

[2024/02/29 20:16:50.815 +09:00] [INFO] [tikv_handler.go:2005] ["update server labels"] [labels="{\"foo\":\"bar\"}"]
  1. check the labels again by curl 127.0.0.1:10080/info/all

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

curl 127.0.0.1:10080/info/all
{
 "servers_num": 1,
 "owner_id": "d807298d-d747-4ded-b896-480beceed704",
 "is_all_server_version_consistent": true,
 "all_servers_info": {
  "d807298d-d747-4ded-b896-480beceed704": {
   "version": "8.0.11-TiDB-v8.0.0-alpha-208-gf0a26dd2a3",
   "git_hash": "f0a26dd2a36d688d9a691302edb5429d1f15e351",
   "ddl_id": "d807298d-d747-4ded-b896-480beceed704",
   "ip": "127.0.0.1",
   "listening_port": 4000,
   "status_port": 10080,
   "lease": "45s",
   "binlog_status": "Off",
   "start_timestamp": 1709205226,
   "labels": {"foo": "bar"}, // there should be labels
   "server_id": 914
  }
 }
}

3. What did you see instead (Required)

curl 127.0.0.1:10080/info/all
{
 "servers_num": 1,
 "owner_id": "d807298d-d747-4ded-b896-480beceed704",
 "is_all_server_version_consistent": true,
 "all_servers_info": {
  "d807298d-d747-4ded-b896-480beceed704": {
   "version": "8.0.11-TiDB-v8.0.0-alpha-208-gf0a26dd2a3",
   "git_hash": "f0a26dd2a36d688d9a691302edb5429d1f15e351",
   "ddl_id": "d807298d-d747-4ded-b896-480beceed704",
   "ip": "127.0.0.1",
   "listening_port": 4000,
   "status_port": 10080,
   "lease": "45s",
   "binlog_status": "Off",
   "start_timestamp": 1709205226,
   "labels": {}, // there are no labels instead
   "server_id": 914
  }
 }
}

4. What is your TiDB version? (Required)

Release Version: v8.0.0-alpha-208-gf0a26dd2a3
Edition: Community
Git Commit Hash: f0a26dd2a36d688d9a691302edb5429d1f15e351
Git Branch: HEAD
UTC Build Time: 2024-02-06 03:48:06
GoVersion: go1.21.6
Race Enabled: false
Check Table Before Drop: false
Store: tikv
@you06 you06 added the type/bug The issue is confirmed as a bug. label Feb 29, 2024
ti-chi-bot bot pushed a commit that referenced this issue Mar 4, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this issue Mar 7, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this issue Mar 7, 2024
@seiya-annie
Copy link

/found customer

@ti-chi-bot ti-chi-bot bot added the report/customer Customers have encountered this bug. label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 affects-7.1 affects-7.5 report/customer Customers have encountered this bug. severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants