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

Remove staleFiles set and onIndexOutputClosed from FSDirectory

    Details

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

      Description

      Hi,
      the "hack" to keep track of files written to in FSDirectory, to filter them when calling sync is heavily broken. Michael McCandless already opened an issue, which was abandoned then.

      In fact handling this in FSDirectory is a hack and broken! If IndexWriter is itsself not able to correctly handle tracking the files, it is also his repsonsibilty to do this. We already have a class that can do this: TrackingDirectoryWrapper. IndexWriter should use an instance of this class to track those stale files (until the problem is solved).

      I would like to keep FSDirectory clean from this, especially, as this is broken anyways: If somebody has another directory impl like HDFS or Infinispan, the problem still persists. The base directory should throw an IOException if trying to sync a file that does not exist!

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: