diff --git a/pkg/controller/aofshrink.go b/pkg/controller/aofshrink.go index 4180b911..2c96ef0c 100644 --- a/pkg/controller/aofshrink.go +++ b/pkg/controller/aofshrink.go @@ -258,6 +258,9 @@ func (c *Controller) aofshrink() { if err := c.aof.Close(); err != nil { log.Fatalf("shrink live aof close fatal operation: %v", err) } + if err := f.Close(); err != nil { + log.Fatalf("shrink new aof close fatal operation: %v", err) + } if err := os.Rename(core.AppendFileName, core.AppendFileName+"-bak"); err != nil { log.Fatalf("shrink backup fatal operation: %v", err) }