Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wshwsh12 committed Oct 11, 2022
1 parent 2321b61 commit 0c39f03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions util/gctuner/memory_limit_tuner.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ 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() {
memoryLimit := t.calcMemoryLimit()
if EnableGOGCTuner.Load() {
memoryLimit = math.MaxInt64
var memoryLimit int64 = math.MaxInt64
if !EnableGOGCTuner.Load() {
memoryLimit = t.calcMemoryLimit()
}
if memoryLimit == math.MaxInt64 {
t.isTuning.Store(false)
Expand Down

0 comments on commit 0c39f03

Please sign in to comment.