MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / Sync

Method Sync

src/log/writable_file.cc:87–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 }
86
87 virtual Status Sync() {
88#if __linux__
89 // Ensure new files referred to by the manifest are in the filesystem.
90 if (fflush_unlocked(file_) != 0 || fdatasync(fileno(file_)) != 0) {
91 return IOError(filename_, errno);
92 }
93#else
94 // Ensure new files referred to by the manifest are in the filesystem.
95 if (fflush(file_) != 0 || fsync(fileno(file_)) != 0) {
96 return IOError(filename_, errno);
97 }
98#endif
99 return Status::OK();
100 }
101
102 private:
103 std::string filename_;

Callers

nothing calls this directly

Calls 1

IOErrorFunction · 0.85

Tested by

no test coverage detected