You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/06/18 20:15:17 UTC

[GitHub] [lucene-solr] jpountz commented on a change in pull request #1593: LUCENE-9409: Check file lengths before creating slices.

jpountz commented on a change in pull request #1593:
URL: https://github.com/apache/lucene-solr/pull/1593#discussion_r442477973



##########
File path: lucene/core/src/java/org/apache/lucene/codecs/lucene86/Lucene86PointsReader.java
##########
@@ -93,18 +97,12 @@ public Lucene86PointsReader(SegmentReadState readState) throws IOException {
             BKDReader reader = new BKDReader(metaIn, indexIn, dataIn);
             readers.put(fieldNumber, reader);
           }
-          indexLength = metaIn.readLong();
-          dataLength = metaIn.readLong();
         } catch (Throwable t) {
           priorE = t;
         } finally {
           CodecUtil.checkFooter(metaIn, priorE);
         }
       }
-      // At this point, checksums of the meta file have been validated so we

Review comment:
       we don't lose safety, but in case of a corrupt meta file, it might be slightly more confusing in the sense that the suppressed exception will complain about a truncated index/data file




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org