Flush to file periodically

This commit is contained in:
Alex Roitman 2017-12-11 16:12:15 -08:00
parent 5945ae2a68
commit 28aebe856f
1 changed files with 5 additions and 5 deletions

View File

@ -169,7 +169,6 @@ func (c *Controller) aofshrink() {
) )
}() }()
}
if len(aofbuf) > maxchunk { if len(aofbuf) > maxchunk {
if _, err := f.Write(aofbuf); err != nil { if _, err := f.Write(aofbuf); err != nil {
return err return err
@ -177,6 +176,7 @@ func (c *Controller) aofshrink() {
aofbuf = aofbuf[:0] aofbuf = aofbuf[:0]
} }
} }
}
// load hooks // load hooks
// first load the names of the hooks // first load the names of the hooks