You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jun Rao (JIRA)" <ji...@apache.org> on 2009/04/08 19:52:12 UTC

[jira] Created: (CASSANDRA-66) get_column throws exception on missing column

get_column throws exception on missing column
---------------------------------------------

                 Key: CASSANDRA-66
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
             Project: Cassandra
          Issue Type: Improvement
            Reporter: Jun Rao


get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720753#action_12720753 ] 

Jonathan Ellis commented on CASSANDRA-66:
-----------------------------------------

My patch was applied to Thrift trunk today.  (Roughly 7 weeks after submission, for the record. :)

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>             Fix For: 0.3
>
>         Attachments: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch, 0002-return-empty-lists-instead-of-raising-an-error-where.patch, 0002-v2.patch, libthrift.jar
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis resolved CASSANDRA-66.
-------------------------------------

    Resolution: Fixed

I waited a few days but Bryan Duxbury (the Thrift developer most active in the Java side) hasn't been around and the system tests are useful enough that I want to get this in.  I will take responsibility for tracking progress on THRIFT-378.

Committed.

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>             Fix For: 0.3
>
>         Attachments: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch, 0002-return-empty-lists-instead-of-raising-an-error-where.patch, 0002-v2.patch, libthrift.jar
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis reassigned CASSANDRA-66:
---------------------------------------

    Assignee: Jonathan Ellis

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jonathan Ellis
>             Fix For: 0.3
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-66:
------------------------------------

    Fix Version/s: 0.3

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>             Fix For: 0.3
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697126#action_12697126 ] 

Jonathan Ellis commented on CASSANDRA-66:
-----------------------------------------

Yes, we even have a ColumnNotFoundException for these, but it's not hooked up to thrift.  I've written that code a couple times now.  This goes on my "after Avinash is done adding stuff to Service" list.

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701589#action_12701589 ] 

Jonathan Ellis commented on CASSANDRA-66:
-----------------------------------------

1. disagree; the point is to let the thrift layer handle it for consistency (just like it would any other RuntimeException that the code encountered).  of course the other way to be consistent would be to add try/catch (RuntimeException) to all the methods which is nasty boilerplate.  let the generated code do boilerplate, that's what it's for.

2. in an ideal world, I agree, but I have submitted patches to thrift before and the mean time to review is probably multiple weeks.

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>             Fix For: 0.3
>
>         Attachments: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch, 0002-return-empty-lists-instead-of-raising-an-error-where.patch, 0002-v2.patch, libthrift.jar
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701586#action_12701586 ] 

Jun Rao commented on CASSANDRA-66:
----------------------------------

A few comments on the patch.

1. It seems to me that in batch_insert(),  when there is an InvalidRequestException,  instead of throwing RuntimeException, it's better to just log the error. (ditto for batch_insert_supercolumn). Also, can you define an exception in a thrift method when the method has no return values? This would be the ideal place to handle those exceptions.

2. I think that we should wait until THRIFT-378 is committed before applying this patch.



> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>             Fix For: 0.3
>
>         Attachments: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch, 0002-return-empty-lists-instead-of-raising-an-error-where.patch, 0002-v2.patch, libthrift.jar
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702577#action_12702577 ] 

Jun Rao commented on CASSANDRA-66:
----------------------------------

For those who may want to change the cassandra thrift api, could you describe how you patched Thrift here (e.g., is the patch applied on a released version or trunk version)? 

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>             Fix For: 0.3
>
>         Attachments: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch, 0002-return-empty-lists-instead-of-raising-an-error-where.patch, 0002-v2.patch, libthrift.jar
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701193#action_12701193 ] 

Jonathan Ellis commented on CASSANDRA-66:
-----------------------------------------

0002
    return empty lists instead of raising an error where applicable; otherwise, use
    NotFoundError instead of CassandraException.  rely on THRIFT-378 to report internal errors.
    also, add field numbers to work around thrift bug generating python code.

0001
    move CF checking into CassandraServer.  begin to expose InvalidRequestException.  r/m unused "del" cfmaps from batch methods.

(new libthrift.jar is built with the THRIFT-378 patch applied.)

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jonathan Ellis
>             Fix For: 0.3
>
>         Attachments: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch, 0002-return-empty-lists-instead-of-raising-an-error-where.patch, libthrift.jar
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-66:
------------------------------------

    Attachment: libthrift.jar

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jonathan Ellis
>             Fix For: 0.3
>
>         Attachments: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch, 0002-return-empty-lists-instead-of-raising-an-error-where.patch, libthrift.jar
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702578#action_12702578 ] 

Jonathan Ellis commented on CASSANDRA-66:
-----------------------------------------

thrift has no released version.  so yes, svn co thrift and patch -pX thrift-378.patch.

I'll make sure that patch continues to apply to thrift trunk as necessary.

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>             Fix For: 0.3
>
>         Attachments: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch, 0002-return-empty-lists-instead-of-raising-an-error-where.patch, 0002-v2.patch, libthrift.jar
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700227#action_12700227 ] 

Jonathan Ellis commented on CASSANDRA-66:
-----------------------------------------

Haven't been able to get a status from Avinash on his multiget changes, so I will carry on with this and deal with the conflicts if and when they arise.

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jonathan Ellis
>             Fix For: 0.3
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis reassigned CASSANDRA-66:
---------------------------------------

    Assignee: Jun Rao  (was: Jonathan Ellis)

can you review?

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>             Fix For: 0.3
>
>         Attachments: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch, 0002-return-empty-lists-instead-of-raising-an-error-where.patch, 0002-v2.patch, libthrift.jar
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-66:
------------------------------------

    Attachment: 0002-v2.patch

rebase after CASSANDRA-92

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jonathan Ellis
>             Fix For: 0.3
>
>         Attachments: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch, 0002-return-empty-lists-instead-of-raising-an-error-where.patch, 0002-v2.patch, libthrift.jar
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-66:
------------------------------------

    Attachment: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jonathan Ellis
>             Fix For: 0.3
>
>         Attachments: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch, 0002-return-empty-lists-instead-of-raising-an-error-where.patch, libthrift.jar
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-66:
------------------------------------

    Attachment: 0002-return-empty-lists-instead-of-raising-an-error-where.patch

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jonathan Ellis
>             Fix For: 0.3
>
>         Attachments: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch, 0002-return-empty-lists-instead-of-raising-an-error-where.patch, libthrift.jar
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-66) get_column throws exception on missing column

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-66:
------------------------------------

    Fix Version/s:     (was: 0.4)
                   0.3

> get_column throws exception on missing column
> ---------------------------------------------
>
>                 Key: CASSANDRA-66
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-66
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>             Fix For: 0.3
>
>         Attachments: 0001-move-CF-checking-into-CassandraServer.-begin-to-exp.patch, 0002-return-empty-lists-instead-of-raising-an-error-where.patch, 0002-v2.patch, libthrift.jar
>
>
> get_column() throws a TException when a column is missing. It should throw a special exception (e.g, ColumnMissingException) to distinguish this case from a real failure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.