lucene-dev mailing list archives

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


ASF GitHub Bot commented on LUCENE-5588:

GitHub user laimis opened a pull request:

    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):
    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 IOUtils_fix

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

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 <>
Date:   2015-01-05T02:59:02Z

    fsync for directories on windows does not make sense

commit 1c1fc88ce879610f4efa5788c74281bf739563f9
Author: Laimonas Simutis <>
Date:   2015-01-05T22:21:58Z

    ignore fsync for directory completely

commit c299699801ff2abfb932997075c6addf1a5cb05a
Author: Laimonas Simutis <>
Date:   2015-01-05T22:23:58Z

    Merge into IOUtils_fix


> We should also fsync the directory when committing
> --------------------------------------------------
>                 Key: LUCENE-5588
>                 URL:
>             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,
> 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, can also open a directory:

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message