mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-17 08:36:55 +03:00
This allows performing a single MustFsyncPath() for the parent directory after multiple calls to these functions. This clarifies code paths, which call these functions, and makes them more maintainable. This also removes a redundant fsync() call for the parent directory when creating a file-based part. Previously the first fsync() was indirectly called when the directory was created via MustMkdirFailIfExist() and the second fsync() was called via MustSyncPathAndParentDir() after all the data is written to the part.