Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
D3Hunter committed Sep 19, 2023
1 parent a3e9817 commit c7202f7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions disttask/importinto/encode_and_sort_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,12 @@ func newEncodeAndSortOperator(ctx context.Context, executor *importStepExecutor,
logger: executor.logger,
errCh: make(chan error),
}
var workerIDAlloc atomic.Int64
pool := workerpool.NewWorkerPool(
"encodeAndSortOperator",
util.ImportInto,
int(executor.taskMeta.Plan.ThreadCnt),
func() workerpool.Worker[*importStepMinimalTask, workerpool.None] {
id := workerIDAlloc.Inc()
return newChunkWorker(ctx, op, id)
return newChunkWorker(ctx, op)
},
)
op.AsyncOperator = operator.NewAsyncOperator(subCtx, pool)
Expand Down Expand Up @@ -137,7 +135,7 @@ type chunkWorker struct {
indexWriter *importer.IndexRouteWriter
}

func newChunkWorker(ctx context.Context, op *encodeAndSortOperator, workerID int64) *chunkWorker {
func newChunkWorker(ctx context.Context, op *encodeAndSortOperator) *chunkWorker {
w := &chunkWorker{
ctx: ctx,
op: op,
Expand Down

0 comments on commit c7202f7

Please sign in to comment.