mirror of https://github.com/tidwall/tile38.git
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…
Reference in New Issue