cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-11537) Give clear error when certain nodetool commands are issued before server is ready
Date Mon, 18 Apr 2016 10:11:25 GMT


Sylvain Lebresne commented on CASSANDRA-11537:

I'm not sure using {{Keyspace.initialized}} for this is the best option: {{Keyspace.setInitialized}}
is called pretty early during startup and arguably doesn't guarantee everything is ready.
For instance, it's set before the commit log is replayed.
What I would suggest here is to set some {{startupDone}} flag in {{StorageService}}, which
could be set at the end of {{StorageService.initServer()}} and that would be exposed by {{StorageServiceMBean}}.
{{nodetool}} could then just check this as part of its startup and exit if the server is not
ready. We'd also get the "no stack" for free which I agree would be neat since it doesn't
add anything imo.

> Give clear error when certain nodetool commands are issued before server is ready
> ---------------------------------------------------------------------------------
>                 Key: CASSANDRA-11537
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>            Priority: Minor
>              Labels: lhf
> As an ops person upgrading and servicing Cassandra servers, I require a more clear message
when I issue a nodetool command that the server is not ready for it so that I am not confused.
> Technical description:
> If you deploy a new binary, restart, and issue nodetool scrub/compact/updatess etc you
get unfriendly assertion. An exception would be easier to understand. Also if a user has turned
assertions off it is unclear what might happen. 
> {noformat}
> EC1: Throw exception to make it clear server is still in start up process. 
> :~# nodetool upgradesstables
> error: null
> -- StackTrace --
> java.lang.AssertionError
>     at
>     at org.apache.cassandra.service.StorageService.getValidKeyspace(
>     at org.apache.cassandra.service.StorageService.getValidColumnFamilies(
>     at org.apache.cassandra.service.StorageService.upgradeSSTables(
> {noformat}
> EC1: 
> Patch against 2.1 (branch)

This message was sent by Atlassian JIRA

View raw message