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

infoschema,store: fix the inconsistent definition of StoreStatus between TiDB/PD (#11969) #11972

Merged
merged 1 commit into from
Sep 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions infoschema/tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,8 @@ var tableTiKVStoreStatusCols = []columnInfo{
{"LEADER_SCORE", mysql.TypeLonglong, 21, 0, nil, nil},
{"LEADER_SIZE", mysql.TypeLonglong, 21, 0, nil, nil},
{"REGION_COUNT", mysql.TypeLonglong, 21, 0, nil, nil},
{"REGION_WEIGHT", mysql.TypeLonglong, 21, 0, nil, nil},
{"REGION_SCORE", mysql.TypeLonglong, 21, 0, nil, nil},
{"REGION_WEIGHT", mysql.TypeDouble, 22, 0, nil, nil},
{"REGION_SCORE", mysql.TypeDouble, 22, 0, nil, nil},
{"REGION_SIZE", mysql.TypeLonglong, 21, 0, nil, nil},
{"START_TS", mysql.TypeDatetime, 0, 0, nil, nil},
{"LAST_HEARTBEAT_TS", mysql.TypeDatetime, 0, 0, nil, nil},
Expand Down Expand Up @@ -746,8 +746,8 @@ func dataForTiKVStoreStatus(ctx sessionctx.Context) (records [][]types.Datum, er
row[10].SetInt64(storeStat.Status.LeaderScore)
row[11].SetInt64(storeStat.Status.LeaderSize)
row[12].SetInt64(storeStat.Status.RegionCount)
row[13].SetInt64(storeStat.Status.RegionWeight)
row[14].SetInt64(storeStat.Status.RegionScore)
row[13].SetFloat64(storeStat.Status.RegionWeight)
row[14].SetFloat64(storeStat.Status.RegionScore)
row[15].SetInt64(storeStat.Status.RegionSize)
startTs := types.Time{
Time: types.FromGoTime(storeStat.Status.StartTs),
Expand Down
4 changes: 2 additions & 2 deletions store/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ type StoreDetailStat struct {
LeaderScore int64 `json:"leader_score"`
LeaderSize int64 `json:"leader_size"`
RegionCount int64 `json:"region_count"`
RegionWeight int64 `json:"region_weight"`
RegionScore int64 `json:"region_score"`
RegionWeight float64 `json:"region_weight"`
RegionScore float64 `json:"region_score"`
RegionSize int64 `json:"region_size"`
StartTs time.Time `json:"start_ts"`
LastHeartbeatTs time.Time `json:"last_heartbeat_ts"`
Expand Down