Lucene - Core
  1. Lucene - Core
  2. LUCENE-3658

NRTCachingDir has invalid asserts (if same file name is written twice)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Normally Lucene is write-once (except for segments.gen file, which NRTCachingDir never caches), but in some tests (TestDoc, TestCrash) we can write the same file more than once.

      I don't think NRTCachingDir should have these asserts, and I think on createOutput it should remove any old file if present.

      I also found & fixed a possible concurrency issue (if more than one thread syncs at the same time; IndexWriter doesn't ever do this today but it has in the past).

      1. LUCENE-3658.patch
        11 kB
        Michael McCandless

        Activity

        Hide
        Michael McCandless added a comment -

        Patch. I think it's ready...

        Show
        Michael McCandless added a comment - Patch. I think it's ready...
        Hide
        Robert Muir added a comment -

        thanks for looking at these 2 tests, now you see why I bailed on them!

        +1 to commit

        Show
        Robert Muir added a comment - thanks for looking at these 2 tests, now you see why I bailed on them! +1 to commit

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development