-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Open
Labels
first-time-contributorIndicates that the PR was contributed by an external member and is a first-time contributor.Indicates that the PR was contributed by an external member and is a first-time contributor.good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.type/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Description
Enhancement
The unused code can be obtained through the following instructions:
golangci-lint run --no-config --disable-all --enable=unused --timeout=30m --skip-files=".*_test\.go" ./pkg/...
- infoschema: remove unused code #61959 Rows Changed: +0 −53
- executor: minor cleanup in builder.go #61924 Rows Changed: +7 −15
- expression, ddl: remove useless code #62000 Rows Changed: +0 −73
- ddl,planner: remove unused and meaningless code #61936 Rows Changed: +0 −23
- statistics, lightning: remove useless code #62004 Rows Changed: +0 −139
- disttask, util: remove useless code #62056 Rows Changed: +0 −132
- kv, owner: remove unused variables, functions, and struct fields #63879 Rows Changed: +3 −39 by @amrable
- planner, gcworker, executor: remove unused code #64496 +0 -90
Rest:
pkg/resourcemanager/poolmanager/task_manager.go:52:16: func `(*Meta).getOriginConcurrency` is unused (unused)
func (m *Meta) getOriginConcurrency() int32 {
^
pkg/resourcemanager/poolmanager/task_manager.go:124:23: func `(*TaskManager).hasTask` is unused (unused)
func (t *TaskManager) hasTask(taskID uint64) bool {
^
pkg/util/cgroup/cgroup_cpu.go:24:5: var `errNoCPUControllerDetected` is unused (unused)
var errNoCPUControllerDetected = errors.New("no cpu controller detected")
^
pkg/sessionctx/vardef/tidb_vars.go:1804:6: func `mustParseDuration` is unused (unused)
func mustParseDuration(str string) time.Duration {
^
pkg/util/tiflashcompute/topo_fetcher.go:161:27: func `(*MockTopoFetcher).assureTopo` is unused (unused)
func (f *MockTopoFetcher) assureTopo(nodeNum int) error {
^
pkg/store/mockstore/unistore/tikv/mvcc/tikv.go:131:5: var `errInvalidLockCFValue` is unused (unused)
var errInvalidLockCFValue = errors.New("invalid lock CF value")
^
pkg/sessionctx/stmtctx/stmtctx.go:71:6: type `jsonSQLWarn` is unused (unused)
type jsonSQLWarn struct {
^
pkg/kv/kv.go:792:2: field `accessKey` is unused (unused)
accessKey []byte
^
pkg/timer/api/store.go:50:26: func `(*OptionalVal[T]).internalPresent` is unused (unused)
func (o *OptionalVal[T]) internalPresent() bool {
^
pkg/table/tables/tables.go:1469:23: func `(*TableCommon).canSkipUpdateBinlog` is unused (unused)
func (t *TableCommon) canSkipUpdateBinlog(col *table.Column) bool {
^
pkg/owner/mock.go:45:2: field `retireHook` is unused (unused)
retireHook func()
^
pkg/distsql/select_result.go:52:2: var `errQueryInterrupted` is unused (unused)
errQueryInterrupted = dbterror.ClassExecutor.NewStd(errno.ErrQueryInterrupted)
^
pkg/store/mockstore/mockstore.go:272:6: func `copyImage` is unused (unused)
func copyImage() (string, error) {
^
pkg/workloadlearning/handle.go:115:16: func `(*Handle).analyzeBasedOnStatementSummary` is unused (unused)
func (*Handle) analyzeBasedOnStatementSummary() []*TableReadCostMetrics {
^
pkg/workloadlearning/handle.go:338:6: func `checkCrossDB` is unused (unused)
func checkCrossDB(sql string) (bool, error) {
^
pkg/ttl/ttlworker/job.go:123:2: field `statusMutex` is unused (unused)
statusMutex sync.Mutex
^
pkg/ttl/ttlworker/session.go:60:5: var `allIsolationReadEngines` is unused (unused)
var allIsolationReadEngines = map[kv.StoreType]struct{}{
^
pkg/executor/join/hash_join_test_util.go:147:6: func `buildDataSource` is unused (unused)
func buildDataSource(sortCase *testutil.SortCase, schema *expression.Schema) *testutil.MockDataSource {
......
Metadata
Metadata
Assignees
Labels
first-time-contributorIndicates that the PR was contributed by an external member and is a first-time contributor.Indicates that the PR was contributed by an external member and is a first-time contributor.good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.type/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.