You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Aaron Morton <aa...@thelastpickle.com> on 2010/09/29 05:28:46 UTC

Couple of minor logging / error message things

Noticed these when working against the current 0.7.0 beta2 (#3) build...

When sending a system_add_keyspace request with an invalid keyspace the response to the client is fine...
 
(python)
InvalidRequestException: InvalidRequestException(why='Invalid keyspace name: Test Keyspace 1285729085.78')

However it's not logged in the system.log. Looking through the code it appears that none of the Config errors are logged at any level. It may be handy to log these as a record of attempted changes on the system.

In thrift/CassandraServer system_add_keyspace() the strategy_class string from the KsDef is used to load a class. The ClassNotFoundError is then caught and used to build an InvalidRequestException. If the strategy_class is missing or empty, the error returned to the client is 

(python)
InvalidRequestException: InvalidRequestException(why='')



Aaron


Re: Couple of minor logging / error message things

Posted by aaron morton <aa...@thelastpickle.com>.
Added CASSANDRA-1556 for the error message. 

Aaron

On 29 Sep 2010, at 16:45, Jonathan Ellis wrote:

> On Tue, Sep 28, 2010 at 10:28 PM, Aaron Morton <aa...@thelastpickle.com> wrote:
>> Noticed these when working against the current 0.7.0 beta2 (#3) build...
>> When sending a system_add_keyspace request with an invalid keyspace the
>> response to the client is fine...
>> 
>> (python)
>> InvalidRequestException: InvalidRequestException(why='Invalid keyspace name:
>> Test Keyspace 1285729085.78')
>> However it's not logged in the system.log.
> 
> We don't log any InvalidRequest.  Not sure if it's worth
> special-casing system_ methods there.
> 
>> In thrift/CassandraServer system_add_keyspace() the strategy_class string
>> from the KsDef is used to load a class. The ClassNotFoundError is then
>> caught and used to build an InvalidRequestException. If the strategy_class
>> is missing or empty, the error returned to the client is
>> (python)
>> InvalidRequestException: InvalidRequestException(why='')
> 
> Can you create a ticket for this?
> 
> -- 
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com


Re: Couple of minor logging / error message things

Posted by Jonathan Ellis <jb...@gmail.com>.
On Tue, Sep 28, 2010 at 10:28 PM, Aaron Morton <aa...@thelastpickle.com> wrote:
> Noticed these when working against the current 0.7.0 beta2 (#3) build...
> When sending a system_add_keyspace request with an invalid keyspace the
> response to the client is fine...
>
> (python)
> InvalidRequestException: InvalidRequestException(why='Invalid keyspace name:
> Test Keyspace 1285729085.78')
> However it's not logged in the system.log.

We don't log any InvalidRequest.  Not sure if it's worth
special-casing system_ methods there.

> In thrift/CassandraServer system_add_keyspace() the strategy_class string
> from the KsDef is used to load a class. The ClassNotFoundError is then
> caught and used to build an InvalidRequestException. If the strategy_class
> is missing or empty, the error returned to the client is
> (python)
> InvalidRequestException: InvalidRequestException(why='')

Can you create a ticket for this?

-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com