Flush to file periodically

This commit is contained in:
Alex Roitman 2017-12-11 16:12:15 -08:00
parent 5945ae2a68
commit 28aebe856f

View File

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