Perform file sync outside of lock on Commit

Signed-off-by: Xinyang Ge <xinyang.ge@databricks.com>
This commit is contained in:
Xinyang Ge
2024-04-24 13:38:51 -07:00
parent c4c3c6ea56
commit 4167416754
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
}