Skip to content

Commit

Permalink
*: fix auto analyze worker crash when killed by global memory limit (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysan authored Dec 15, 2022
1 parent 8a539c1 commit 79b4e63
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions statistics/handle/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,11 @@ func (h *Handle) getAnalyzeSnapshot() (bool, error) {

// HandleAutoAnalyze analyzes the newly created table or index.
func (h *Handle) HandleAutoAnalyze(is infoschema.InfoSchema) (analyzed bool) {
defer func() {
if r := recover(); r != nil {
logutil.BgLogger().Error("HandleAutoAnalyze panicked", zap.Any("error", r), zap.Stack("stack"))
}
}()
err := h.UpdateSessionVar()
if err != nil {
logutil.BgLogger().Error("[stats] update analyze version for auto analyze session failed", zap.Error(err))
Expand Down

0 comments on commit 79b4e63

Please sign in to comment.