Skip to content

Commit

Permalink
statistics: fix the possible wrong result for stats_healthy (#52319)
Browse files Browse the repository at this point in the history
ref #29769
  • Loading branch information
winoros authored Apr 2, 2024
1 parent 7a20e43 commit 4a92d81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/statistics/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ func (coll *HistColl) GetScaledRealtimeAndModifyCnt(idxStats *Index) (realtimeCn
// GetStatsHealthy calculates stats healthy if the table stats is not pseudo.
// If the table stats is pseudo, it returns 0, false, otherwise it returns stats healthy, true.
func (t *Table) GetStatsHealthy() (int64, bool) {
if t == nil || t.Pseudo {
if t == nil || t.Pseudo || !t.IsAnalyzed() {
return 0, false
}
var healthy int64
Expand Down

0 comments on commit 4a92d81

Please sign in to comment.