Skip to content

Commit

Permalink
*: clean up code
Browse files Browse the repository at this point in the history
Signed-off-by: BornChanger <dawn_catcher@126.com>
  • Loading branch information
BornChanger committed Feb 3, 2023
1 parent 07b7220 commit 7086b8b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 38 deletions.
2 changes: 0 additions & 2 deletions ddl/resource_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ func TestResourceGroupBasic(t *testing.T) {
"CPU='4000m' " +
"IO_READ_BANDWIDTH='1G' " +
"IO_WRITE_BANDWIDTH='300M'")
// RAW_MODE is not supported by information_schema.resource_groups
//tk.MustQuery("select * from information_schema.resource_groups where name = 'z'").Check(testkit.Rows("z RAW_MODE <nil> <nil> <nil> <nil> 4000 1000000000 300000000"))
tk.MustQuery("show create resource group z").Check(testkit.Rows("z CREATE RESOURCE GROUP `z` CPU=\"4000m\" IO_READ_BANDWIDTH=\"1G\" IO_WRITE_BANDWIDTH=\"300M\""))

tk.MustExec("create resource group do_not_delete_rg ru_per_sec=100")
Expand Down
32 changes: 0 additions & 32 deletions executor/infoschema_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -3415,38 +3415,6 @@ func (e *memtableRetriever) setDataFromResourceGroups() error {
burstable,
)
rows = append(rows, row)
/*
case rmpb.GroupMode_RawMode:
mode = "RAW_MODE"
cpuSetting, err := strconv.Atoi(strings.Trim(strings.Split(group.RawResourceSettings.Cpu.Settings.String(), ":")[1], " "))
if err != nil {
return errors.Errorf("invalid fill rate of CPU for resource group %s", group.Name)
}
readIoSetting, err := strconv.Atoi(strings.Trim(strings.Split(group.RawResourceSettings.IoRead.Settings.String(), ":")[1], " "))
if err != nil {
return errors.Errorf("invalid fill rate of READ for resource group %s", group.Name)
}
writeIoSetting, err := strconv.Atoi(strings.Trim(strings.Split(group.RawResourceSettings.IoWrite.Settings.String(), ":")[1], " "))
if err != nil {
return errors.Errorf("invalid fill rate of WRITE for resource group %s", group.Name)
}
burstable := false
if group.RawResourceSettings. < 0 {
burstable = true
}
row := types.MakeDatums(
group.Name,
mode,
nil,
nil,
cpuSetting,
readIoSetting,
writeIoSetting,
burstable,
)
rows = append(rows, row)
*/
default:
//mode = "UNKNOWN_MODE"
row := types.MakeDatums(
Expand Down
4 changes: 0 additions & 4 deletions infoschema/tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -1594,12 +1594,8 @@ var tableMemoryUsageOpsHistoryCols = []columnInfo{

var tableResourceGroupsCols = []columnInfo{
{name: "NAME", tp: mysql.TypeVarchar, size: resourcegroup.MaxGroupNameLength, flag: mysql.NotNullFlag},
//{name: "MODE", tp: mysql.TypeVarchar, size: 12, flag: mysql.NotNullFlag},
{name: "RU_PER_SEC", tp: mysql.TypeLonglong, size: 21},
{name: "RU_TOKENS", tp: mysql.TypeLonglong, size: 21},
//{name: "CPU", tp: mysql.TypeLonglong, size: 21},
//{name: "READ_BANDWIDTH", tp: mysql.TypeLonglong, size: 21},
//{name: "WRITE_BANDWIDTH", tp: mysql.TypeLonglong, size: 21},
{name: "BURSTABLE", tp: mysql.TypeVarchar, size: 3},
}

Expand Down

0 comments on commit 7086b8b

Please sign in to comment.