Skip to content

Commit

Permalink
domain: Make dumpFileGcChecker logging less noisy (#45024)
Browse files Browse the repository at this point in the history
close #45019
  • Loading branch information
dveeden authored Jun 29, 2023
1 parent b6caf7b commit 9735568
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion domain/plan_replayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,16 @@ func (p *dumpFileGcChecker) setupSctx(sctx sessionctx.Context) {
func (p *dumpFileGcChecker) gcDumpFilesByPath(path string, gcDurationDefault, gcDurationForCapture time.Duration) {
entries, err := os.ReadDir(path)
if err != nil {
logutil.BgLogger().Warn("[dumpFileGcChecker] open plan replayer directory failed", zap.Error(err))
if !os.IsNotExist(err) {
absPath, err2 := filepath.Abs(path)
if err2 != nil {
logutil.BgLogger().Warn("[dumpFileGcChecker] failed to get absolute path", zap.Error(err2))
absPath = path
}
logutil.BgLogger().Warn("[dumpFileGcChecker] open plan replayer directory failed",
zap.Error(err),
zap.String("path", absPath))
}
}

gcTargetTimeDefault := time.Now().Add(-gcDurationDefault)
Expand Down

0 comments on commit 9735568

Please sign in to comment.