Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: guo-shaoge <[email protected]>
  • Loading branch information
guo-shaoge committed Feb 9, 2023
1 parent 03fb26c commit 1e9a7c2
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions store/copr/batch_coprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,11 @@ func buildBatchCopTasksConsistentHash(
cache := kvStore.GetRegionCache()
fetchTopoBo := backoff.NewBackofferWithVars(ctx, fetchTopoMaxBackoff, nil)

var retryNum int
var rangesLen int
var storesStr []string
var (
retryNum int
rangesLen int
storesStr []string
)

tasks := make([]*copTask, 0)
regionIDs := make([]tikv.RegionVerID, 0)
Expand Down Expand Up @@ -704,8 +706,8 @@ func buildBatchCopTasksConsistentHash(
logutil.BgLogger().Warn("buildBatchCopTasksConsistentHash takes too much time",
zap.Duration("total elapsed", elapsed),
zap.Int("retryNum", retryNum),
zap.Duration("SplitKeyRangesByLocations", splitKeyElapsed),
zap.Duration("fetchTopo", fetchTopoElapsed),
zap.Duration("splitKeyElapsed", splitKeyElapsed),
zap.Duration("fetchTopoElapsed", fetchTopoElapsed),
zap.Int("range len", rangesLen),
zap.Int("copTaskNum", len(tasks)),
zap.Int("batchCopTaskNum", len(res)))
Expand Down Expand Up @@ -1207,11 +1209,13 @@ func buildBatchCopTasksConsistentHashForPD(bo *backoff.Backoffer,
storeType kv.StoreType,
ttl time.Duration) (res []*batchCopTask, err error) {
const cmdType = tikvrpc.CmdBatchCop
var retryNum int
var rangesLen int
var copTaskNum int
var splitKeyElapsed time.Duration
var getStoreElapsed time.Duration
var (
retryNum int
rangesLen int
copTaskNum int
splitKeyElapsed time.Duration
getStoreElapsed time.Duration
)
cache := kvStore.GetRegionCache()
start := time.Now()

Expand Down

0 comments on commit 1e9a7c2

Please sign in to comment.