v0.5.3 - Critical bug fix #54
ecton
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Fixed
File operations are now fully persisted to disk to the best ability provided
by each operating system. @justinj discovered that no
fsync()
operationswere happening, and reported the finding. Nebari's TreeFile was using
File::flush()
instead ofFile::sync_data()/sync_all()
. This means that itwould be possible for an OS-level buffer to not be flushed to disk before
Nebari reported a successful write.
Interestingly, this change has no noticable impact on performance on Linux.
However, on Mac OS,
File::sync_data()
performs afcntl
withF_FULLFSYNC
,which has a significant impact on performance. This is the correct behavior,
however, as without this level of guarantee, sudden power loss could result in
data loss.
Many people argue that using
F_BARRIERFSYNC
is sufficient for most people,but Apple's [own documentation][apple-reducing-disk-writes] states this is
necessary:
For now, the stance of Nebari's authors is that
F_FULLFSYNC
is the properway to implement true ACID-compliance.
This discussion was created from the release v0.5.3 - Critical bug fix.
Beta Was this translation helpful? Give feedback.
All reactions