diff --git a/util/gctuner/memory_limit_tuner.go b/util/gctuner/memory_limit_tuner.go index 29804393a7f1f..4d7ed50015da3 100644 --- a/util/gctuner/memory_limit_tuner.go +++ b/util/gctuner/memory_limit_tuner.go @@ -104,10 +104,7 @@ func (t *memoryLimitTuner) GetPercentage() float64 { // UpdateMemoryLimit updates the memory limit. // This function should be called when `tidb_server_memory_limit` or `tidb_server_memory_limit_gc_trigger` is modified. func (t *memoryLimitTuner) UpdateMemoryLimit() { - var memoryLimit int64 = math.MaxInt64 - if !EnableGOGCTuner.Load() { - memoryLimit = t.calcMemoryLimit() - } + var memoryLimit = t.calcMemoryLimit() if memoryLimit == math.MaxInt64 { t.isTuning.Store(false) } else {