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

Break out Directory.syncMetaData from FSDirectory.renameFile

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.2, 7.0
    • None
    • None
    • New

    Description

      Today, when you call FSDirectory.renameFile it also calls fsync on
      the directory.

      This is OK for Lucene's current usage of this method, to rename just
      the one segments_N file on commit.

      But in playing with adding NRT replication (LUCENE-5438) to the simple
      demo Lucene server (LUCENE-5376) I found that, on spinning disks, that
      fsync is very costly, because when copying over an NRT point, we write
      to N .tmp files and then rename many files (taking seconds) in the
      end.

      I think we should just deprecate/remove the existing method, and make a new
      rename method that does only renaming, and a separate
      syncMetaData to call fsync on the directory?

      Attachments

        1. LUCENE-7373.patch
          16 kB
          Michael McCandless

        Activity

          People

            mikemccand Michael McCandless
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: