lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Aroush (JIRA)" <>
Subject [jira] Commented: (LUCENENET-216) FSDirectory.Sync Fix to Ensure Flush to Disk
Date Tue, 10 Nov 2009 04:55:32 GMT


George Aroush commented on LUCENENET-216:

Question: how will this affect the Mono project?  I'm asking about those 2 lines:

        public static extern int FlushFileBuffers(Microsoft.Win32.SafeHandles.SafeFileHandle

Will this cause run-time issues when Lucene.Net is compiled using Mono to run under Linux?
 I'm sure it will unless if Mono has some magic to deal with it.  My suggestion is we make
this code conditional compiled.  That is, if LUCENE_NET_MONO we use this new code, otherwise
we don't.  For the Mono folks, they have to define it.

> FSDirectory.Sync Fix to Ensure Flush to Disk
> --------------------------------------------
>                 Key: LUCENENET-216
>                 URL:
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Michael Garski
>         Attachments: FSDirectory.Sync.patch
> DIGY and Doug discussed this issue during the 2.9 port, and this is a patch to give 2.9
the expected behavior of actually ensuring the OS flushes it's buffers to disk.  DIGY suggested
using the kernel32 method FlushFileBuffers, and after investigation he was correct!  FileStream.Flush
doesn't do that - the OS could still be caching it.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message