Lucene - Core
  1. Lucene - Core
  2. LUCENE-1214

Possible hidden exception on SegmentInfos commit

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: None
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      I am not sure if this is that big of a deal, but I just ran into it and thought I might mention it.

      SegmentInfos.commit removes the Segments File if it hits an exception. If it cannot remove the Segments file (because its not there or on Windows something has a hold of it), another Exception is thrown about not being able to delete the Segments file. Because of this, you lose the first exception, which might have useful info, including why the segments file might not be there to delete.

      • Mark
      1. LUCENE-1214.patch
        5 kB
        Michael McCandless

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12562870 ] jira [ 12583942 ]
        Mark Thomas made changes -
        Workflow jira [ 12425687 ] Default workflow, editable Closed status [ 12562870 ]
        Michael McCandless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mark Miller added a comment -

        I am still trying to work that out...some craziness that started after I updated Lucene to trunk, but also made other fundamental changes, and windows vista may be haunting me too...

        The gist of it is that Lucene is failing when it tries to create an index file (creates the directory fine). I don't think its Lucene related at the moment, but I havnt gotten to the bottom of it either.

        Oddly, if I stop using the NoLockFactory (I manually manage a single Writer), things work...still digging though.

        Show
        Mark Miller added a comment - I am still trying to work that out...some craziness that started after I updated Lucene to trunk, but also made other fundamental changes, and windows vista may be haunting me too... The gist of it is that Lucene is failing when it tries to create an index file (creates the directory fine). I don't think its Lucene related at the moment, but I havnt gotten to the bottom of it either. Oddly, if I stop using the NoLockFactory (I manually manage a single Writer), things work...still digging though.
        Michael McCandless made changes -
        Attachment LUCENE-1214.patch [ 12377534 ]
        Hide
        Michael McCandless added a comment -

        Attached patch. All tests pass. I plan to commit in a day or so.

        Show
        Michael McCandless added a comment - Attached patch. All tests pass. I plan to commit in a day or so.
        Michael McCandless made changes -
        Field Original Value New Value
        Assignee Michael McCandless [ mikemccand ]
        Hide
        Michael McCandless added a comment -

        Good catch Mark. It seems like we should ignore any exception while trying to delete the partially written segments_N file, and throw the original exception. I'll do that.

        How did you hit these two exceptions?

        Show
        Michael McCandless added a comment - Good catch Mark. It seems like we should ignore any exception while trying to delete the partially written segments_N file, and throw the original exception. I'll do that. How did you hit these two exceptions?
        Mark Miller created issue -

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Mark Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development