You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Vladimir Dolzhenko (JIRA)" <ji...@apache.org> on 2018/10/05 11:12:00 UTC

[jira] [Comment Edited] (LUCENE-8525) throw more specific exception on data corruption

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

Vladimir Dolzhenko edited comment on LUCENE-8525 at 10/5/18 11:11 AM:
----------------------------------------------------------------------

My point is to throw more specific exception (it could be smth like DataCorruptionException) rather plain IOException. 

from a user (like elastic) point of view it is clear what is happened underneath - is it a real io exception or data specific one. 


was (Author: vladimir.dolzhenko):
My point is throw more specific exception (it could be smth like DataCorruptionException) rather plain IOException. 

from a user (like elastic) point of view it is clear what is happened underneath - is it a real io exception or data specific one. 

> throw more specific exception on data corruption
> ------------------------------------------------
>
>                 Key: LUCENE-8525
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8525
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Vladimir Dolzhenko
>            Priority: Major
>
> DataInput throws generic IOException if data looks odd
> [DataInput:141|https://github.com/apache/lucene-solr/blob/1d85cd783863f75cea133fb9c452302214165a4d/lucene/core/src/java/org/apache/lucene/store/DataInput.java#L141]
> there are other examples like [BufferedIndexInput:219|https://github.com/apache/lucene-solr/blob/1d85cd783863f75cea133fb9c452302214165a4d/lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java#L219], [CompressionMode:226|https://github.com/apache/lucene-solr/blob/1d85cd783863f75cea133fb9c452302214165a4d/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressionMode.java#L226] and maybe [DocIdsWriter:81|https://github.com/apache/lucene-solr/blob/1d85cd783863f75cea133fb9c452302214165a4d/lucene/core/src/java/org/apache/lucene/util/bkd/DocIdsWriter.java#L81]
> That leads to some difficulties - see [elasticsearch #34322|https://github.com/elastic/elasticsearch/issues/34322]
> It would be better if it throws more specific exception like CorruptIndexException



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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