rmuir commented on pull request #1557: URL: https://github.com/apache/lucene-solr/pull/1557#issuecomment-643294631
How would the length in the meta file be incorrect? It comes from a checksum-verified file, right? I think with the current PR, you'll get a somewhat confusing exception for a truncated file, probably something like this: ``` CorruptIndexException("misplaced codec footer (file truncated?): remaining=" + remaining + ", expected=" + expected + ", fp=" + in.getFilePointer(), in) |--- suppressed: new CorruptIndexException("truncated file: length=" + in.length() + " but expectedLength==" + expectedLength, in) ``` Since we actually know the length up-front, we can take advantage of that to just deliver the better exception: `truncated file` directly to the user? ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org