Skip to content

Commit 7dc9a99

Browse files
committed
pkg
1 parent af2b750 commit 7dc9a99

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/statistics/handle/syncload/stats_syncload.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ func (s *statsSyncLoad) handleOneItemTask(task *statstypes.NeededItemTask) (err
351351
t := time.Now()
352352
needUpdate := false
353353
wrapper, err = s.readStatsForOneItem(sctx, item, wrapper, isPkIsHandle, task.Item.FullLoad)
354-
if err != nil || stderrors.As(err, failToGetHistMeta) {
354+
if err != nil || stderrors.Is(err, errGetHistMeta) {
355355
return err
356356
}
357357
if item.IsIndex {
@@ -370,7 +370,7 @@ func (s *statsSyncLoad) handleOneItemTask(task *statstypes.NeededItemTask) (err
370370
return nil
371371
}
372372

373-
var failToGetHistMeta = errors.New("fail to get hist meta")
373+
var errGetHistMeta = errors.New("fail to get hist meta")
374374

375375
// readStatsForOneItem reads hist for one column/index, TODO load data via kv-get asynchronously
376376
func (*statsSyncLoad) readStatsForOneItem(sctx sessionctx.Context, item model.TableItemID, w *statsWrapper, isPkIsHandle bool, fullLoad bool) (*statsWrapper, error) {
@@ -392,7 +392,7 @@ func (*statsSyncLoad) readStatsForOneItem(sctx sessionctx.Context, item model.Ta
392392
logutil.BgLogger().Error("fail to get hist meta for this histogram, possibly a deleted one", zap.Int64("table_id", item.TableID),
393393
zap.Int64("hist_id", item.ID), zap.Bool("is_index", item.IsIndex))
394394
// Although it is errors, we don't return err, because raise error will have to retry. it is unnecessay.
395-
return nil, failToGetHistMeta
395+
return nil, errGetHistMeta
396396
}
397397
if item.IsIndex {
398398
isIndexFlag = 1

0 commit comments

Comments
 (0)