-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.report/customerCustomers have encountered this bug.Customers have encountered this bug.severity/minorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
- start a tidb server
- 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
}
}
}
- 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\"}"]
- 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
Metadata
Metadata
Assignees
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.report/customerCustomers have encountered this bug.Customers have encountered this bug.severity/minorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.