Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wshwsh12 committed Jul 11, 2022
1 parent 0acd1dd commit 0326579
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sessionctx/variable/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1166,9 +1166,9 @@ type SessionVars struct {
// RequestSourceType is the type of inner request.
RequestSourceType string

// MemoryDebugModeThreshold indicated the memory debug mode.
// MemoryDebugModeThreshold indicated the trigger threshold of memory tracking accuracy check.
MemoryDebugModeThreshold int64

// MemoryDebugModeRatio indicated the allowable bias ratio of memory tracking accuracy check.
MemoryDebugModeRatio int64
}

Expand Down
7 changes: 5 additions & 2 deletions sessionctx/variable/tidb_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,12 @@ const (
// TiDBSimplifiedMetrics controls whether to unregister some unused metrics.
TiDBSimplifiedMetrics = "tidb_simplified_metrics"

// TiDBMemoryDebugModeThreshold is used to set tidb memory debug mode.
// TiDBMemoryDebugModeThreshold is used to set tidb memory debug mode trigger threshold.
// When set to 0, the function is disabled.
// When set to a negative integer, use memory debug mode 1 to detect the issue of frequent allocation and release of memory.
// When set to a positive integer, use memory debug mode 2 to detect the issue of memory tracking inaccurate.
TiDBMemoryDebugModeThreshold = "tidb_memory_debug_mode_threshold"
// TiDBMemoryDebugModeRatio is used
// TiDBMemoryDebugModeRatio is used set tidb memory debug mode bias ratio. Treat memory bias less than this ratio as noise.
TiDBMemoryDebugModeRatio = "tidb_memory_debug_mode_ratio"
)

Expand Down

0 comments on commit 0326579

Please sign in to comment.