https://bugs.openldap.org/show_bug.cgi?id=10296
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |TEST
--- Comment #4 from Howard Chu hyc@openldap.org --- (In reply to kero from comment #0)
Created attachment 1045 [details] Use a F_FULLFSYNC fcntl when committing on Mac OS
Hello Howard and Happy New Year,
As discussed in this issue [1], the LMDB durability is incorrect when committing. I propose the following patch that uses fcntl with the F_FULLFSYNC flag. The fcntl documentation is on this page [2].
Note that I kept the calls to msync/fsync for simplicity and because they don't cost much but feel free to skip them on Mac OS.
Sidenote: obviously the call to msync must remain, otherwise there's no guarantee that dirty pages get flushed at all, and then the fcntl would be a no-op.