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

"Cannot rename segments.new to segments"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.4
    • Fix Version/s: None
    • Component/s: core/index
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

    • Bugzilla Id:
      36241

      Description

      AddDocument periodically fails with "Cannot rename segments.new to segments".
      Sometimes it happens after 10,000 documents, sometimes after 200,000 documents.

      My index is placed on a FAT partition. My Lucene version is 1.4.3. I am using
      a single IndexWriter object and doing all AddDocuments calls serially from a
      single thread.

      I saw some discussion about this problem in the mailing lists, but looks like
      the problem wasn't completely eliminated yet.

      My suggested solutions are as follows:

      • If renameTo() fails, wait some time and retry. After this, apply the other
        methods that are now in FSDirectory.java. Retry them as well after waiting for
        some time.
      • In the IndexWriter constructor, check for 'segments.new' if 'segments'
        cannot be found. This would allow recovery if FSDirectory failed on a previous
        run. Now I have to write the recovery code myself outside of Lucene.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikko@noromaa.fi Mikko Noromaa
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: