Skip to content

Commit

Permalink
linter: enable revive for planner/core/optimizer.go (#44110)
Browse files Browse the repository at this point in the history
ref #40786
  • Loading branch information
Cavan-xu authored May 23, 2023
1 parent 909ff3c commit 1b4e842
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions build/nogo_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,7 @@
"planner/core/rule_partition_processor.go": "planner/core/rule_partition_processor.go",
"planner/core/exhaust_physical_plans.go": "planner/core/exhaust_physical_plans.go",
"planner/core/plan_cache_lru.go": "planner/core/plan_cache_lru.go",
"planner/core/optimizer.go": "planner/core/optimizer.go",
"planner/core/common_plans.go": "planner/core/common_plans.go",
"planner/core/common_plans.go": "planner/core/common_plans.go",
"planner/core/plan_cost_ver2.go": "planner/core/plan_cost_ver2.go",
"planner/core/logical_plans.go": "planner/core/logical_plans.go",
"plugin/conn_ip_example/": "plugin/conn_ip_example/"
Expand Down
4 changes: 2 additions & 2 deletions planner/core/optimizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ func calculateTiFlashStreamCountUsingMinLogicalCores(ctx context.Context, sctx s
return false, 0
}
var initialMaxCores uint64 = 10000
var minLogicalCores uint64 = initialMaxCores // set to a large enough value here
var minLogicalCores = initialMaxCores // set to a large enough value here
for _, row := range rows {
if row[4].GetString() == "cpu-logical-cores" {
logicalCpus, err := strconv.Atoi(row[5].GetString())
Expand Down Expand Up @@ -811,7 +811,7 @@ func checkFineGrainedShuffleForJoinAgg(ctx context.Context, sctx sessionctx.Cont
return false, 0 // probably won't reach this path
}

var tiflashServerCount uint64 = 0
var tiflashServerCount uint64
switch (*tiflashServerCountInfo).itemStatus {
case unInitialized:
serversInfo, err := infoschema.GetTiFlashServerInfo(sctx)
Expand Down

0 comments on commit 1b4e842

Please sign in to comment.