Comment by stefan_

4 years ago

I checked a few and they seem to do F_FULLFSYNC (sic), except MySQL, they deleted it to make it run faster:

https://github.com/mysql/mysql-server/commit/3cb16e9c3879d17...

Wow. Could this explain why we have a lot of problems with MySQL running on Mac OS with the databases randomly getting totally corrupted and basically needing to be restored from backup each time?

At first glance, it seems to make sense - if someone shuts down while there is still uncommitted data because MySQL has tried a fsync(), it could leave the files on disk in a weird state when the power is cut. Am I missing something?

"the possible durability gain is slim to none. This also makes OS X behave similar to other platforms."

You didn't report the full reasoning.

  • Maybe that's right, maybe it's not - impossible to tell from the snippet. I'm deeply suspicious when they start citing performance numbers on what is a ultimately an ordering change though.