Lucene - Core
  1. Lucene - Core
  2. LUCENE-5681

Fix RAMDirectory's IndexInput to not double-buffer on slice()

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.10, 6.0
    • Component/s: core/store
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      After LUCENE-4371, we still have a non-optimal implementation of IndexInput#slice() in RAMDirectory. We should fix that to use the cloning approach like other directories do

      1. LUCENE-5681.patch
        7 kB
        Uwe Schindler
      2. LUCENE-5681.patch
        7 kB
        Uwe Schindler
      3. LUCENE-5681.patch
        6 kB
        Uwe Schindler

        Issue Links

          Activity

          Hide
          Uwe Schindler added a comment -

          Patch, including new test.

          The default impl is now only used by Solr anymore. We should fix this, too and remove the BufferedIndexInput.wrap() one completely.

          Show
          Uwe Schindler added a comment - Patch, including new test. The default impl is now only used by Solr anymore. We should fix this, too and remove the BufferedIndexInput.wrap() one completely.
          Hide
          Uwe Schindler added a comment -

          This improvement is especially important for slices of NRTCachingDirectory, because it uses RAMDirectory internally, too!

          Show
          Uwe Schindler added a comment - This improvement is especially important for slices of NRTCachingDirectory, because it uses RAMDirectory internally, too!
          Hide
          Uwe Schindler added a comment -

          Added ineffectivity warning to BufferedIndexInput#wrap() and cleaned up sliceDescription to be consistent.

          Show
          Uwe Schindler added a comment - Added ineffectivity warning to BufferedIndexInput#wrap() and cleaned up sliceDescription to be consistent.
          Hide
          Uwe Schindler added a comment -

          Improve IllegalArgumentExceptions, be more strict on out-of-bounds slice.

          I will commit this tomorrow and backport to 4.10.

          Show
          Uwe Schindler added a comment - Improve IllegalArgumentExceptions, be more strict on out-of-bounds slice. I will commit this tomorrow and backport to 4.10.
          Hide
          Robert Muir added a comment -

          Looks good, thanks Uwe!

          Show
          Robert Muir added a comment - Looks good, thanks Uwe!

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development