Browse Source

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

call fsync after flush
pull/1842/head
Ethan Buchman 7 years ago
committed by GitHub
parent
commit
c3108f14c8
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      autofile/group.go

+ 5
- 1
autofile/group.go 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() {


Loading…
Cancel
Save