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

throw more specific exception on data corruption

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • New

    Description

      DataInput throws generic IOException if data looks odd

      DataInput:141

      there are other examples like BufferedIndexInput:219, CompressionMode:226 and maybe DocIdsWriter:81

      That leads to some difficulties - see elasticsearch #34322

      It would be better if it throws more specific exception.

      As a consequence SegmentInfos.readCommit violates its own contract

      /**
         * @throws CorruptIndexException if the index is corrupt
         * @throws IOException if there is a low-level IO error
         */
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            vladimir.dolzhenko Vladimir Dolzhenko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: