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

Jonathan Ellis commented on CASSANDRA-2116:
-------------------------------------------

I'm not sure having different classes for read/write errors is necessary (code 
that is in a position to catch-and-do-something-reasonable knows what kind of 
op it's attempting). On the other hand, if a write op does a read as part of 
its implementation (indexes cause this to happen) we might need to distinguish 
the two.

I think it's more useful to distinguish between recoverable errors and non-: "I 
got EOF earlier than I thought" usually means the file is corrupt not the disk 
is dead.  (I can't think of any read errors that absolutely mean disk-is-dead.)

It would be useful to get some use out of Java's misguided checked exceptions, 
by keeping recoverable errors checked (IOException) and unrecoverable ones 
unchecked (IOError).

> Separate out filesystem errors from generic IOErrors
> ----------------------------------------------------
>
>                 Key: CASSANDRA-2116
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2116
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Chris Goffinet
>            Priority: Minor
>             Fix For: 1.0
>
>         Attachments: 
> 0001-Separate-out-filesystem-errors-from-generic-IOErrors.patch
>
>
> We throw IOErrors everywhere today in the codebase. We should separate out 
> specific errors such as (reading, writing) from filesystem into FSReadError 
> and FSWriteError. This makes it possible in the next ticket to allow certain 
> failure modes (kill the server if reads or writes fail to disk).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to