Fence installation transaction durability (T-613)

This commit is contained in:
ila
2026-07-18 16:28:49 +08:00
parent 84befee70f
commit 20596a7de4
18 changed files with 697 additions and 64 deletions
+23
View File
@@ -0,0 +1,23 @@
//go:build !windows
package installer
import (
"fmt"
"os"
)
func syncDirectoryPath(path string) error {
directory, err := os.Open(path)
if err != nil {
return fmt.Errorf("open directory: %w", err)
}
if err := directory.Sync(); err != nil {
_ = directory.Close()
return fmt.Errorf("sync directory: %w", err)
}
if err := directory.Close(); err != nil {
return fmt.Errorf("close directory: %w", err)
}
return nil
}