Skip to content

Commit

Permalink
address the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Yisaer committed Dec 13, 2022
1 parent 9f01939 commit 1769e8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sessionctx/variable/tidb_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ const (
DefPasswordReuseHistory = 0
DefPasswordReuseTime = 0
DefTiDBStoreBatchSize = 0
DefTiDBHistoricalStatsDuration = time.Hour * 24 * 7
DefTiDBHistoricalStatsDuration = 7 * 24 * time.Hour
)

// Process global variables.
Expand Down
4 changes: 3 additions & 1 deletion statistics/handle/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ func (h *Handle) GCStats(is infoschema.InfoSchema, ddlLease time.Duration) error
}
}
if err := h.ClearOutdatedHistoryStats(); err != nil {
logutil.BgLogger().Warn("failed to gc outdated historical stats", zap.Duration("duration", variable.HistoricalStatsDuration.Load()))
logutil.BgLogger().Warn("failed to gc outdated historical stats",
zap.Duration("duration", variable.HistoricalStatsDuration.Load()),
zap.Error(err))
}
return h.removeDeletedExtendedStats(gcVer)
}
Expand Down

0 comments on commit 1769e8f

Please sign in to comment.