Skip to content
Merged
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
12 changes: 0 additions & 12 deletions pkg/ddl/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,6 @@ const (
flashbackTimeout = 3 * time.Minute // 3min
)

const (
pdScheduleArgsOffset = 1 + iota
gcEnabledOffset
autoAnalyzeOffset
readOnlyOffset
totalLockedRegionsOffset
startTSOffset
commitTSOffset
ttlJobEnableOffSet
keyRangesOffset
)

func closePDSchedule(ctx context.Context) error {
closeMap := make(map[string]any)
for _, key := range pdScheduleKey {
Expand Down
7 changes: 0 additions & 7 deletions pkg/ddl/ingest/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ const (
LitInfoUnsafeImport string = "do a partial import data into the storage"
)

func genBackendAllocMemFailedErr(ctx context.Context, memRoot MemRoot, jobID int64) error {
logutil.Logger(ctx).Warn(LitErrAllocMemFail, zap.Int64("job ID", jobID),
zap.Int64("current memory usage", memRoot.CurrentUsage()),
zap.Int64("max memory quota", memRoot.MaxMemoryQuota()))
return dbterror.ErrIngestFailed.FastGenByArgs("memory used up")
}

func genEngineAllocMemFailedErr(ctx context.Context, memRoot MemRoot, jobID int64, idxIDs []int64) error {
logutil.Logger(ctx).Warn(LitErrAllocMemFail,
zap.Int64("job ID", jobID),
Expand Down
2 changes: 0 additions & 2 deletions pkg/planner/core/indexmerge_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,6 @@ func generateANDIndexMerge4ComposedIndex(ds *logicalop.DataSource, normalPathCnt

// Collect access paths that satisfy the hints, and make sure there is at least one MV index path.
var mvIndexPathCnt int
candidateAccessPaths := make([]*util.AccessPath, 0, len(ds.PossibleAccessPaths))
for idx := range normalPathCnt {
if (ds.PossibleAccessPaths[idx].IsTablePath() &&
!isInIndexMergeHints(ds, "primary")) ||
Expand All @@ -645,7 +644,6 @@ func generateANDIndexMerge4ComposedIndex(ds *logicalop.DataSource, normalPathCnt
if isMVIndexPath(ds.PossibleAccessPaths[idx]) {
mvIndexPathCnt++
}
candidateAccessPaths = append(candidateAccessPaths, ds.PossibleAccessPaths[idx])
}
if mvIndexPathCnt == 0 {
return nil
Expand Down
2 changes: 0 additions & 2 deletions pkg/planner/core/planbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -6112,7 +6112,6 @@ func getTablePath(paths []*util.AccessPath) *util.AccessPath {

func (b *PlanBuilder) buildAdminAlterDDLJob(ctx context.Context, as *ast.AdminStmt) (_ base.Plan, err error) {
options := make([]*AlterDDLJobOpt, 0, len(as.AlterJobOptions))
optionNames := make([]string, 0, len(as.AlterJobOptions))
mockTablePlan := logicalop.LogicalTableDual{}.Init(b.ctx, b.getSelectOffset())
for _, opt := range as.AlterJobOptions {
_, ok := allowedAlterDDLJobParams[opt.Name]
Expand All @@ -6130,7 +6129,6 @@ func (b *PlanBuilder) buildAdminAlterDDLJob(ctx context.Context, as *ast.AdminSt
return nil, err
}
options = append(options, &alterDDLJobOpt)
optionNames = append(optionNames, opt.Name)
}
p := &AlterDDLJob{
JobID: as.JobNumber,
Expand Down