Skip to content

Commit

Permalink
store/copr: removes the unused fields in batchCopIterator (#24446)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreMouche authored May 11, 2021
1 parent d27fda3 commit daf133c
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions store/copr/batch_coprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ import (
"github.com/pingcap/tidb/store/tikv/logutil"
"github.com/pingcap/tidb/store/tikv/metrics"
"github.com/pingcap/tidb/store/tikv/tikvrpc"
"github.com/pingcap/tidb/store/tikv/util"
"github.com/pingcap/tidb/util/memory"
"go.uber.org/zap"
)

Expand Down Expand Up @@ -184,13 +182,11 @@ func (c *CopClient) sendBatch(ctx context.Context, req *kv.Request, vars *tikv.V
return copErrorResponse{err}
}
it := &batchCopIterator{
store: c.store.kvStore,
req: req,
finishCh: make(chan struct{}),
vars: vars,
memTracker: req.MemTracker,
ClientHelper: tikv.NewClientHelper(c.store.kvStore.store, util.NewTSSet(5)),
rpcCancel: tikv.NewRPCanceller(),
store: c.store.kvStore,
req: req,
finishCh: make(chan struct{}),
vars: vars,
rpcCancel: tikv.NewRPCanceller(),
}
ctx = context.WithValue(ctx, tikv.RPCCancellerCtxKey{}, it.rpcCancel)
it.tasks = tasks
Expand All @@ -200,8 +196,6 @@ func (c *CopClient) sendBatch(ctx context.Context, req *kv.Request, vars *tikv.V
}

type batchCopIterator struct {
*tikv.ClientHelper

store *kvStore
req *kv.Request
finishCh chan struct{}
Expand All @@ -213,8 +207,6 @@ type batchCopIterator struct {

vars *tikv.Variables

memTracker *memory.Tracker

rpcCancel *tikv.RPCCanceller

wg sync.WaitGroup
Expand Down

0 comments on commit daf133c

Please sign in to comment.