Skip to content

Commit

Permalink
statistics: fix index isEvicted (#35170)
Browse files Browse the repository at this point in the history
Signed-off-by: yisaer <disxiaofei@163.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
  • Loading branch information
Yisaer and ti-chi-bot authored Jun 7, 2022
1 parent ae8da6f commit d3cbae0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion statistics/histogram.go
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,12 @@ func (idx *Index) DropEvicted() {

// IsEvicted returns whether index statistics got evicted
func (idx *Index) IsEvicted() bool {
return idx.CMSketch == nil
switch idx.StatsVer {
case Version1:
return idx.CMSketch == nil
default:
return false
}
}

func (idx *Index) String() string {
Expand Down

0 comments on commit d3cbae0

Please sign in to comment.