Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-5588

We should also fsync the directory when committing

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.8, 6.0
    • Component/s: core/store
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      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

        Attachments

        1. LUCENE-5588.patch
          3 kB
          Uwe Schindler
        2. LUCENE-5588.patch
          3 kB
          Uwe Schindler
        3. LUCENE-5588.patch
          2 kB
          Uwe Schindler
        4. LUCENE-5588-nonexistfix.patch
          0.8 kB
          Uwe Schindler

          Issue Links

            Activity

              People

              • Assignee:
                thetaphi Uwe Schindler
                Reporter:
                thetaphi Uwe Schindler
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: