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

RAMInputStream hits false EOF if you seek to EOF then seek back then readBytes

    Details

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

      Description

      TestLazyLoadThreadSafety fails in hudson, possibly an issue with RAMDirectory.
      If you hack lucene testcase to return another directory, the same seed will pass.

      1. LUCENE-2852.patch
        4 kB
        Michael McCandless

        Activity

        Hide
        gsingers Grant Ingersoll added a comment -

        Bulk close for 3.1

        Show
        gsingers Grant Ingersoll added a comment - Bulk close for 3.1
        Hide
        mikemccand Michael McCandless added a comment -

        Resolving. If we ever do another 2.9.x / 3.0.x we can backport by looking @ resolved 3.x issues.

        Show
        mikemccand Michael McCandless added a comment - Resolving. If we ever do another 2.9.x / 3.0.x we can backport by looking @ resolved 3.x issues.
        Hide
        mikemccand Michael McCandless added a comment -

        Fixed on 3.1, 4.0... I'll leave open for 2.9.x/3.0.x in case we do another release for them.

        Show
        mikemccand Michael McCandless added a comment - Fixed on 3.1, 4.0... I'll leave open for 2.9.x/3.0.x in case we do another release for them.
        Hide
        mikemccand Michael McCandless added a comment -

        Patch.

        Amazing this corner case has lasted so long undetected!

        If you seek to EOF (or, beyond), and then seek back to the same block as where you just were, then the currentBufferIndex is off and you hit premature EOF.

        Show
        mikemccand Michael McCandless added a comment - Patch. Amazing this corner case has lasted so long undetected! If you seek to EOF (or, beyond), and then seek back to the same block as where you just were, then the currentBufferIndex is off and you hit premature EOF.
        Hide
        rcmuir Robert Muir added a comment -

        I dont have time to dig into this one right now, but i think the first thing to check is if the problem is when filesize % buffersize == 0

        If this is the case, its the same off-by-one we had in MMapDirectory.

        Show
        rcmuir Robert Muir added a comment - I dont have time to dig into this one right now, but i think the first thing to check is if the problem is when filesize % buffersize == 0 If this is the case, its the same off-by-one we had in MMapDirectory.
        Hide
        rcmuir Robert Muir added a comment -

        [junit] NOTE: reproduce with: ant test -Dtestcase=TestThreadSafe -Dtestmethod=testLazyLoadThreadSafety -Dtests.seed=-1064017852044447297:2570930923565383654 -Dtests.multiplier=3

        Show
        rcmuir Robert Muir added a comment - [junit] NOTE: reproduce with: ant test -Dtestcase=TestThreadSafe -Dtestmethod=testLazyLoadThreadSafety -Dtests.seed=-1064017852044447297:2570930923565383654 -Dtests.multiplier=3

          People

          • Assignee:
            mikemccand Michael McCandless
            Reporter:
            rcmuir Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development