Merge pull request #52 from tendermint/573-wal-issues

call fsync after flush
This commit is contained in:
Ethan Buchman 2017-09-22 09:35:52 -04:00 committed by GitHub
commit c3108f14c8
1 changed files with 5 additions and 1 deletions

View File

@ -153,7 +153,11 @@ func (g *Group) WriteLine(line string) error {
func (g *Group) Flush() error {
g.mtx.Lock()
defer g.mtx.Unlock()
return g.headBuf.Flush()
err := g.headBuf.Flush()
if err == nil {
err = g.Head.Sync()
}
return err
}
func (g *Group) processTicks() {