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

linter: enable revive for planner/core/optimizer.go #44102

Closed
wants to merge 2 commits into from
Closed
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
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
5 changes: 2 additions & 3 deletions planner/core/optimizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import (
"github.com/pingcap/tidb/util/mathutil"
"github.com/pingcap/tidb/util/set"
"github.com/pingcap/tidb/util/tracing"
"github.com/pingcap/tipb/go-tipb"
"go.uber.org/atomic"
"go.uber.org/zap"
"golang.org/x/exp/slices"
Expand Down Expand Up @@ -778,7 +777,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 +810,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