Skip to content

Commit

Permalink
manually call GC after the map shrink
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Sep 15, 2023
1 parent 2b00e05 commit a611e88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/index/job/correction/service/corrector.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"io"
"os"
"path/filepath"
"runtime"
"sync"
"sync/atomic"

Expand Down Expand Up @@ -287,6 +288,7 @@ func (c *correct) correctWithCache(ctx context.Context) (err error) {
delete(tmpSet, k)
}
tmpSet = nil
runtime.GC()
// ~DEBUG:

log.Infof("correction finished for agent %s", addr)
Expand Down

0 comments on commit a611e88

Please sign in to comment.