You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2010/02/03 03:16:21 UTC
[jira] Created: (CASSANDRA-756) Table.open should not propagate
IOException
Table.open should not propagate IOException
-------------------------------------------
Key: CASSANDRA-756
URL: https://issues.apache.org/jira/browse/CASSANDRA-756
Project: Cassandra
Issue Type: Improvement
Components: Core
Reporter: Jonathan Ellis
Priority: Trivial
Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
(This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-756) Table.open should not propagate
IOException
Posted by "Rodrigo Peinado (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846216#action_12846216 ]
Rodrigo Peinado commented on CASSANDRA-756:
-------------------------------------------
Revised the patch, it's OK.
> Table.open should not propagate IOException
> -------------------------------------------
>
> Key: CASSANDRA-756
> URL: https://issues.apache.org/jira/browse/CASSANDRA-756
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Rodrigo Peinado
> Priority: Trivial
> Fix For: 0.7
>
> Attachments: CASSANDRA-756-1.patch, CASSANDRA-756.patch
>
>
> Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
> We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
> (This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-756) Table.open should not propagate
IOException
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845351#action_12845351 ]
Jonathan Ellis commented on CASSANDRA-756:
------------------------------------------
(Minor point: as mentioned in the issue description, it's better to re-throw as IOError than RtE.)
> Table.open should not propagate IOException
> -------------------------------------------
>
> Key: CASSANDRA-756
> URL: https://issues.apache.org/jira/browse/CASSANDRA-756
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Priority: Trivial
> Attachments: CASSANDRA-756.patch
>
>
> Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
> We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
> (This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-756) Table.open should not propagate
IOException
Posted by "Rodrigo Peinado (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rodrigo Peinado updated CASSANDRA-756:
--------------------------------------
Attachment: (was: CASSANDRA-756-1.patch)
> Table.open should not propagate IOException
> -------------------------------------------
>
> Key: CASSANDRA-756
> URL: https://issues.apache.org/jira/browse/CASSANDRA-756
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Rodrigo Peinado
> Priority: Trivial
> Fix For: 0.7
>
> Attachments: CASSANDRA-756.patch
>
>
> Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
> We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
> (This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CASSANDRA-756) Table.open should not propagate
IOException
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis reassigned CASSANDRA-756:
----------------------------------------
Assignee: Rodrigo Peinado
> Table.open should not propagate IOException
> -------------------------------------------
>
> Key: CASSANDRA-756
> URL: https://issues.apache.org/jira/browse/CASSANDRA-756
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Rodrigo Peinado
> Priority: Trivial
> Fix For: 0.7
>
> Attachments: CASSANDRA-756.patch
>
>
> Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
> We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
> (This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-756) Table.open should not propagate
IOException
Posted by "Rodrigo Peinado (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rodrigo Peinado updated CASSANDRA-756:
--------------------------------------
Attachment: CASSANDRA-756-1.patch
> Table.open should not propagate IOException
> -------------------------------------------
>
> Key: CASSANDRA-756
> URL: https://issues.apache.org/jira/browse/CASSANDRA-756
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Rodrigo Peinado
> Priority: Trivial
> Fix For: 0.7
>
> Attachments: CASSANDRA-756-1.patch, CASSANDRA-756.patch
>
>
> Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
> We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
> (This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-756) Table.open should not propagate
IOException
Posted by "Rodrigo Peinado (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846095#action_12846095 ]
Rodrigo Peinado commented on CASSANDRA-756:
-------------------------------------------
I will have to correct some javadoc in CASSANDRA-756-1.patch for the methods that no longer throws IOException.
> Table.open should not propagate IOException
> -------------------------------------------
>
> Key: CASSANDRA-756
> URL: https://issues.apache.org/jira/browse/CASSANDRA-756
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Rodrigo Peinado
> Priority: Trivial
> Fix For: 0.7
>
> Attachments: CASSANDRA-756-1.patch, CASSANDRA-756.patch
>
>
> Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
> We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
> (This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-756) Table.open should not propagate
IOException
Posted by "Rodrigo Peinado (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rodrigo Peinado updated CASSANDRA-756:
--------------------------------------
Attachment: (was: CASSANDRA-756-1.path)
> Table.open should not propagate IOException
> -------------------------------------------
>
> Key: CASSANDRA-756
> URL: https://issues.apache.org/jira/browse/CASSANDRA-756
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Rodrigo Peinado
> Priority: Trivial
> Fix For: 0.7
>
> Attachments: CASSANDRA-756.patch
>
>
> Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
> We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
> (This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-756) Table.open should not propagate
IOException
Posted by "Rodrigo Peinado (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rodrigo Peinado updated CASSANDRA-756:
--------------------------------------
Attachment: CASSANDRA-756-1.patch
Removed IOException from CFS.getColumnFamily and related methods.
> Table.open should not propagate IOException
> -------------------------------------------
>
> Key: CASSANDRA-756
> URL: https://issues.apache.org/jira/browse/CASSANDRA-756
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Rodrigo Peinado
> Priority: Trivial
> Fix For: 0.7
>
> Attachments: CASSANDRA-756-1.patch, CASSANDRA-756.patch
>
>
> Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
> We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
> (This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-756) Table.open should not propagate
IOException
Posted by "Rodrigo Peinado (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rodrigo Peinado updated CASSANDRA-756:
--------------------------------------
Attachment: CASSANDRA-756-1.path
> Table.open should not propagate IOException
> -------------------------------------------
>
> Key: CASSANDRA-756
> URL: https://issues.apache.org/jira/browse/CASSANDRA-756
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Rodrigo Peinado
> Priority: Trivial
> Fix For: 0.7
>
> Attachments: CASSANDRA-756.patch
>
>
> Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
> We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
> (This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-756) Table.open should not propagate
IOException
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-756:
-------------------------------------
Comment: was deleted
(was: Removed IOException from CFS.getColumnFamily and related methods.)
> Table.open should not propagate IOException
> -------------------------------------------
>
> Key: CASSANDRA-756
> URL: https://issues.apache.org/jira/browse/CASSANDRA-756
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Rodrigo Peinado
> Priority: Trivial
> Fix For: 0.7
>
> Attachments: CASSANDRA-756-1.patch, CASSANDRA-756.patch
>
>
> Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
> We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
> (This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-756) Table.open should not propagate
IOException
Posted by "Rodrigo Peinado (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rodrigo Peinado updated CASSANDRA-756:
--------------------------------------
Attachment: CASSANDRA-756.patch
this patch is just for Table.open
> Table.open should not propagate IOException
> -------------------------------------------
>
> Key: CASSANDRA-756
> URL: https://issues.apache.org/jira/browse/CASSANDRA-756
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Priority: Trivial
> Attachments: CASSANDRA-756.patch
>
>
> Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
> We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
> (This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-756) Table.open should not propagate
IOException
Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845337#action_12845337 ]
Gary Dusbabek commented on CASSANDRA-756:
-----------------------------------------
We should probably extend this practice anywhere we catch IOException and rethrow as RuntimeException.
> Table.open should not propagate IOException
> -------------------------------------------
>
> Key: CASSANDRA-756
> URL: https://issues.apache.org/jira/browse/CASSANDRA-756
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Priority: Trivial
> Attachments: CASSANDRA-756.patch
>
>
> Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
> We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
> (This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-756) Table.open should not propagate
IOException
Posted by "Rodrigo Peinado (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845345#action_12845345 ]
Rodrigo Peinado commented on CASSANDRA-756:
-------------------------------------------
I will check the rest of the code to see what can I do.
> Table.open should not propagate IOException
> -------------------------------------------
>
> Key: CASSANDRA-756
> URL: https://issues.apache.org/jira/browse/CASSANDRA-756
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Priority: Trivial
> Attachments: CASSANDRA-756.patch
>
>
> Unrecoverable errors should not be checked exceptions; in the case of IOException, it has an analogue, IOError, specifically designed to be re-thrown for unrecoverable problems. Table.open falls into this category.
> We should re-throw as IOError from Table.open and r/m the IOException propagation that affects a ton of code.
> (This is not the only such place we need to change but it is probably the most prominent.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.