Skip to content

safe: Add SyncParent

Sami Hiltunen requested to merge smh-sync-parent into master

When creating new directory entries, the parent directory needs to be synced in order to flush the directory entry creation to the disk. If not, the files and directories created could disappear post crash. As this is a common enough pattern, let's add a helper to make this more convenient. For now, there are no callers in the code base but we'll soon have many locations doing so when we add missing fsyncs. The WAL will also need to sync parent directories, and is currently doing the call to filepath.Dir manually.

Merge request reports