You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2014/07/23 14:05:38 UTC

[jira] [Commented] (LUCENE-5842) Validate checksum footers for postings lists, docvalues, storedfields, termvectors on init

    [ https://issues.apache.org/jira/browse/LUCENE-5842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14071642#comment-14071642 ] 

Adrien Grand commented on LUCENE-5842:
--------------------------------------

+1

> Validate checksum footers for postings lists, docvalues, storedfields, termvectors on init
> ------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-5842
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5842
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>
> For small files (e.g. where we read in all the bytes anyway), we currently validate the checksum on reader init. 
> But for larger files like .doc/.frq/.pos/.dvd/.fdt/.tvd we currently do nothing at all on init, as it would be too expensive.
> We should at least do this:
> {code}
> // NOTE: data file is too costly to verify checksum against all the bytes on 
> // open, but for now we at least verify proper structure of the checksum 
> // footer: which looks for FOOTER_MAGIC + algorithmID. This is cheap 
> // and can detect some forms of corruption such as file truncation.
> CodecUtil.retrieveChecksum(data);
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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