Merge pull request #10128 from xinyangge-db/lockless_sync

Perform file sync outside of lock on Commit
This commit is contained in:
Maksym Pavlenko
2024-05-01 21:46:43 +00:00
committed by GitHub
3 changed files with 27 additions and 0 deletions

View File

@@ -206,3 +206,11 @@ func (w *writer) Truncate(size int64) error {
}
return w.fp.Truncate(0)
}
func (w *writer) Sync() error {
if w.fp != nil {
return w.fp.Sync()
}
return nil
}