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

BlockPackedReader to throw better exception

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.10.3
    • Fix Version/s: 7.0, 6.5
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      BlockPackedReader doesn't tell us which file we failed reading. Here's a stack trace from a 4.10.3 install, but it applies to trunk as well.

      org.apache.solr.common.SolrException; null:java.io.IOException: Corrupted
      at org.apache.lucene.util.packed.BlockPackedReader.<init>(BlockPackedReader.java:56)
      at org.apache.lucene.codecs.lucene42.Lucene42DocValuesProducer.loadNumeric(Lucene42DocValuesProducer.java:204)
      at org.apache.lucene.codecs.lucene42.Lucene42DocValuesProducer.getNumeric(Lucene42DocValuesProducer.java:174)
      at org.apache.lucene.codecs.perfield.PerFieldDocValuesFormat$FieldsReader.getNumeric(PerFieldDocValuesFormat.java:248)
      at org.apache.lucene.index.SegmentCoreReaders.getNumericDocValues(SegmentCoreReaders.java:194)
      at org.apache.lucene.index.SegmentReader.getNumericDocValues(SegmentReader.java:229)
      at org.apache.lucene.search.FieldCacheImpl.getLongs(FieldCacheImpl.java:883)
      

        Activity

        Hide
        mdrob Mike Drob added a comment -

        Attaching simple patch to include more detail in the exception thrown. All tests under lucene/core passed locally for me.

        I think we should apply this to both trunk and branch_6x.

        Michael McCandless - Want to take a look? I feel like I'm playing whack-a-mole with improving these exceptions individually as I find them in my logs.

        Show
        mdrob Mike Drob added a comment - Attaching simple patch to include more detail in the exception thrown. All tests under lucene/core passed locally for me. I think we should apply this to both trunk and branch_6x. Michael McCandless - Want to take a look? I feel like I'm playing whack-a-mole with improving these exceptions individually as I find them in my logs.
        Hide
        mikemccand Michael McCandless added a comment -

        Why are you hitting so many crazy exceptions Mike Drob!

        Patch looks great; I'll commit soon. Thanks Mike Drob!

        Show
        mikemccand Michael McCandless added a comment - Why are you hitting so many crazy exceptions Mike Drob ! Patch looks great; I'll commit soon. Thanks Mike Drob !
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit cab3aae11dd6e781acabf513095eb11606feddde in lucene-solr's branch refs/heads/master from Mike McCandless
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=cab3aae ]

        LUCENE-7710: BlockPackedReader now throws CorruptIndexException if bitsPerValue is out of bounds, not generic IOException

        Show
        jira-bot ASF subversion and git services added a comment - Commit cab3aae11dd6e781acabf513095eb11606feddde in lucene-solr's branch refs/heads/master from Mike McCandless [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=cab3aae ] LUCENE-7710 : BlockPackedReader now throws CorruptIndexException if bitsPerValue is out of bounds, not generic IOException
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit e903f69ab31384b5af17e38e2257dca4bee5a673 in lucene-solr's branch refs/heads/branch_6x from Mike McCandless
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e903f69 ]

        LUCENE-7710: BlockPackedReader now throws CorruptIndexException if bitsPerValue is out of bounds, not generic IOException

        Show
        jira-bot ASF subversion and git services added a comment - Commit e903f69ab31384b5af17e38e2257dca4bee5a673 in lucene-solr's branch refs/heads/branch_6x from Mike McCandless [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e903f69 ] LUCENE-7710 : BlockPackedReader now throws CorruptIndexException if bitsPerValue is out of bounds, not generic IOException
        Hide
        mikemccand Michael McCandless added a comment -

        Thanks Mike Drob!

        Show
        mikemccand Michael McCandless added a comment - Thanks Mike Drob !

          People

          • Assignee:
            Unassigned
            Reporter:
            mdrob Mike Drob
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development