lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-5588) We should also fsync the directory when committing
Date Mon, 05 Jan 2015 22:37:35 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-5588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14265251#comment-14265251
] 

ASF GitHub Bot commented on LUCENE-5588:
----------------------------------------

GitHub user laimis opened a pull request:

    https://github.com/apache/lucenenet/pull/43

    IOUtils fsync for directory fix

    UnauthorizedAccessException is being thrown when FSDirectory uses fsync for files and
then tries to fsync a directory. The current implementation does not work for directories,
and it is not entirely clear what to do in those cases in a way that works across all platforms.
    
    It seems like Lucene version is failing for directories as well and they are handing it
by capturing IOException (which won't work with UnauthorizedAccessException):
    https://issues.apache.org/jira/browse/LUCENE-5588
    
    The discussion is still on going on the mailing list, checking this in and will adjust
based on feedback received.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/laimis/lucenenet IOUtils_fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucenenet/pull/43.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #43
    
----
commit 7b8256c61f195c73a9ef071a3ac30a40f148daac
Author: Laimonas Simutis <laimis@gmail.com>
Date:   2015-01-05T02:59:02Z

    fsync for directories on windows does not make sense

commit 1c1fc88ce879610f4efa5788c74281bf739563f9
Author: Laimonas Simutis <laimis@gmail.com>
Date:   2015-01-05T22:21:58Z

    ignore fsync for directory completely

commit c299699801ff2abfb932997075c6addf1a5cb05a
Author: Laimonas Simutis <laimis@gmail.com>
Date:   2015-01-05T22:23:58Z

    Merge https://github.com/apache/lucenenet into IOUtils_fix

----


> We should also fsync the directory when committing
> --------------------------------------------------
>
>                 Key: LUCENE-5588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5588
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/store
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 4.8, Trunk
>
>         Attachments: LUCENE-5588-nonexistfix.patch, LUCENE-5588.patch, LUCENE-5588.patch,
LUCENE-5588.patch
>
>
> Since we are on Java 7 now and we already fixed FSDir.sync to use FileChannel (LUCENE-5570),
we can also fsync the directory (at least try to do it). Unlike RandomAccessFile, which must
be a regular file, FileChannel.open() can also open a directory: http://stackoverflow.com/questions/7694307/using-filechannel-to-fsync-a-directory-with-nio-2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message