Skip to content

Commit

Permalink
infoschema,store: fix the inconsitent defination of StoreStatus betwe…
Browse files Browse the repository at this point in the history
…en TiDB/PD (#11972)
  • Loading branch information
sre-bot authored and winkyao committed Sep 2, 2019
1 parent 1f87310 commit 8b0a453
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit 8b0a453

Please sign in to comment.