cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Stupp (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-7597) System.exit() calls should be removed from DatabaseDescriptor
Date Thu, 24 Jul 2014 10:40:38 GMT


Robert Stupp commented on CASSANDRA-7597:

And even the disk failure policy might cause a {{System.exit()}} for a good reason; there
are ticket(s) to shutdown non-gracefully on OOM (which is also a good reason - definetly better
than corrupting data).

In case of just loading configuration, it might be simple. Add a new function - something
like {{loadConfigNoExit()]}} that returns a boolean or throws an exception to indicate an
invalid configuration.

But I don't see a viable alternative for the other usages of System.exit.

> System.exit() calls should be removed from DatabaseDescriptor
> -------------------------------------------------------------
>                 Key: CASSANDRA-7597
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Cassandra 2.0.9 (earlier version should be affected as well)
>            Reporter: Pavel Sakun
> We're using SSTableSimpleUnsortedWriter API to generate SSTable to be loaded into cassandra.
In case of any issue with config DatabaseDescriptor calls System.exit() which is apparently
not the thing you expect while using API.
> Test case is simple:
> System.setProperty( "cassandra.config", "" );
> new YamlConfigurationLoader().loadConfig();
> Thread.sleep( 5000 );
> System.out.println("We're still alive"); // this will never be called

This message was sent by Atlassian JIRA

View raw message