Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

statistics: add some key info in sync load timeout log (#49630) #49636

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions statistics/column.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package statistics

import (
"math"
"strconv"

"github.com/pingcap/errors"
"github.com/pingcap/tidb/parser/model"
Expand Down Expand Up @@ -123,7 +122,9 @@ func (c *Column) IsInvalid(sctx sessionctx.Context, collPseudo bool) bool {
if c.IsLoadNeeded() && stmtctx != nil {
if stmtctx.StatsLoad.Timeout > 0 {
logutil.BgLogger().Warn("Hist for column should already be loaded as sync but not found.",
zap.String(strconv.FormatInt(c.Info.ID, 10), c.Info.Name.O))
zap.Int64("table_id", c.PhysicalID),
zap.Int64("column_id", c.Info.ID),
zap.String("column_name", c.Info.Name.O))
}
// In some tests, the c.Info is not set, so we add this check here.
if c.Info != nil {
Expand Down