Another interesting read: http://www.humboldt.co.uk/2009/03/fsync-across-platforms.html
Gili On Nov 24, 12:18 am, Gili Tzabari <[email protected]> wrote: > Good news! It looks like JDK7 invokes FlushFileBuffers() in the > following cases: > > 1. MappedByteBuffer.force(). Seehttp://bugs.sun.com/view_bug.do?bug_id=6816049 > andhttp://hg.openjdk.java.net/jdk7/build/jdk/rev/3740c2da7cc5 > > 2. AsynchronousFileChannel.force() > > I found other matches but it wasn't immediately obvious which public > APIs they get invoked by. Anyway, I think we can take away two > important points from this: > > 1. Sun/Oracle has contacted Microsoft about the use of > FlushFileBuffers() and they implied it would do the job. > > 2. Java exposes this functionality through publicly accessible APIs. > > This should make it easier for you to retrofit your test program. > > Gili > > Hopefully this means they also invoke it from other places... > > Gili > > On Nov 24, 12:01 am, Gili Tzabari <[email protected]> wrote: > > > > > > > > > Hi Thomas, > > > I wanted to follow up your post about Durability > > problems:http://www.h2database.com/html/advanced.html?highlight=fsync&search=f... > > > If you follow the Mac OS X link you refer to you will find out the > > following: > > > 1. fsync() flushes the OS-level disk cache to the disk, but does not > > force the disk to flush its on-board write cache. > > 2. Under Mac OS X you can use F_FULLFSYNC to force the disk to flush > > its on-board write cache. > > Source:http://lists.apple.com/archives/darwin-dev/2005/Feb/msg00072.html > > 3. Under Windows you can use FlushFileBuffers() to force the disk to > > flush its on-board write cache. Source: > > http://www.mail-archive.com/[email protected]/msg08132.html > > andhttp://old.nabble.com/Re%3A-Performance-problem-with-3.2.7-p1591614.html > > > So first of all, we need to establish whether these sources are > > correct. If you rewrite your test in terms of FlushFileBuffers() does > > it flush to disk correctly? Next, assuming this works, we need to > > figure out whether this API is accessible through Java. If not, we can > > file a RFE with Oracle as well as looking into using JNI under H2 > > (ugly, but doable). > > > What do you think? > > > Gili -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
