Skip to content

Commit

Permalink
sessionctx: change @@tidb_enable_gogc_tuner default value to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao committed Dec 13, 2023
1 parent 161107a commit 265ab11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sessionctx/variable/tidb_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ const (
DefTiDBServerMemoryLimitSessMinSize = 128 << 20
DefTiDBMergePartitionStatsConcurrency = 1
DefTiDBServerMemoryLimitGCTrigger = 0.7
DefTiDBEnableGOGCTuner = true
DefTiDBEnableGOGCTuner = false
// DefTiDBGOGCTunerThreshold is to limit TiDBGOGCTunerThreshold.
DefTiDBGOGCTunerThreshold float64 = 0.6
DefTiDBGOGCMaxValue = 500
Expand Down
2 changes: 2 additions & 0 deletions pkg/sessionctx/variable/varsutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/pingcap/tidb/pkg/kv"
"github.com/pingcap/tidb/pkg/parser/mysql"
"github.com/pingcap/tidb/pkg/parser/terror"
"github.com/pingcap/tidb/pkg/util/gctuner"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -92,6 +93,7 @@ func TestNewSessionVars(t *testing.T) {
require.Equal(t, DefTiDBAnalyzeVersion, vars.AnalyzeVersion)
require.Equal(t, DefCTEMaxRecursionDepth, vars.CTEMaxRecursionDepth)
require.Equal(t, int64(DefTiDBTmpTableMaxSize), vars.TMPTableSize)
require.Equal(t, DefTiDBEnableGOGCTuner, gctuner.EnableGOGCTuner.Load())

assertFieldsGreaterThanZero(t, reflect.ValueOf(vars.MemQuota))
assertFieldsGreaterThanZero(t, reflect.ValueOf(vars.BatchSize))
Expand Down

0 comments on commit 265ab11

Please sign in to comment.