Why not use fsync to ensure log file is written to disk? #516
ZuchaoWang
started this conversation in
General
Replies: 1 comment
-
The logging thing is broken and I don't think it's maintained. We would probably make it "correct" next time we want to do logging and recovery. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I see in disk_manager.cpp, at the end of WriteLog and WritePage functions, we call flush(). The comment says "needs to flush to keep disk file in sync". But doesn't fstream's flush() just flush data from standard buffer to OS buffer? I don't think it will flush related OS buffer pages to disk. Why not call fsync() to force everything to disk?
Beta Was this translation helpful? Give feedback.
All reactions