Flush to file periodically
This commit is contained in:
parent
5945ae2a68
commit
28aebe856f
@ -169,12 +169,12 @@ func (c *Controller) aofshrink() {
|
||||
)
|
||||
|
||||
}()
|
||||
}
|
||||
if len(aofbuf) > maxchunk {
|
||||
if _, err := f.Write(aofbuf); err != nil {
|
||||
return err
|
||||
if len(aofbuf) > maxchunk {
|
||||
if _, err := f.Write(aofbuf); err != nil {
|
||||
return err
|
||||
}
|
||||
aofbuf = aofbuf[:0]
|
||||
}
|
||||
aofbuf = aofbuf[:0]
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user