Skip to content

Commit

Permalink
log: support reloading tidb-query-max-log-len after modified (#12491)
Browse files Browse the repository at this point in the history
  • Loading branch information
fzhedu authored and sre-bot committed Oct 12, 2019
1 parent 9aca495 commit 1f3af1e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ slow-threshold = 300
expensive-threshold = 10000

# Maximum query length recorded in log.
query-log-max-len = 2048
query-log-max-len = 4096

# File logging.
[log.file]
Expand Down
2 changes: 1 addition & 1 deletion tidb-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func loadConfig() string {
// hotReloadConfigItems lists all config items which support hot-reload.
var hotReloadConfigItems = []string{"Performance.MaxProcs", "Performance.MaxMemory", "Performance.CrossJoin",
"Performance.FeedbackProbability", "Performance.QueryFeedbackLimit", "Performance.PseudoEstimateRatio",
"OOMUseTmpStorage", "OOMAction", "MemQuotaQuery", "StmtSummary.MaxStmtCount", "StmtSummary.MaxSQLLength"}
"OOMUseTmpStorage", "OOMAction", "MemQuotaQuery", "StmtSummary.MaxStmtCount", "StmtSummary.MaxSQLLength", "Log.QueryLogMaxLen"}

func reloadConfig(nc, c *config.Config) {
// Just a part of config items need to be reload explicitly.
Expand Down
2 changes: 1 addition & 1 deletion util/logutil/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const (
// DefaultSlowThreshold is the default slow log threshold in millisecond.
DefaultSlowThreshold = 300
// DefaultQueryLogMaxLen is the default max length of the query in the log.
DefaultQueryLogMaxLen = 2048
DefaultQueryLogMaxLen = 4096
)

// EmptyFileLogConfig is an empty FileLogConfig.
Expand Down

0 comments on commit 1f3af1e

Please sign in to comment.