You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2013/04/24 10:31:17 UTC
[jira] [Updated] (CASSANDRA-5467) isRunning flag set prematurely in
org.apache.cassandra.transport.Server
[ https://issues.apache.org/jira/browse/CASSANDRA-5467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sylvain Lebresne updated CASSANDRA-5467:
----------------------------------------
Attachment: 5467.txt
That's definitively not unreasonable. Initially, isRunning was set first so we don't start the server twice if the {{start()}} method was called twice. But tbh it's not really useful a protection so attaching a trivial patch that just move setting isRunning once the server is indeed started.
> isRunning flag set prematurely in org.apache.cassandra.transport.Server
> -----------------------------------------------------------------------
>
> Key: CASSANDRA-5467
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5467
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.2
> Reporter: John Sanda
> Assignee: Sylvain Lebresne
> Priority: Minor
> Labels: jmx, server
> Attachments: 5467.txt
>
>
> In org.apache.cassandra.transport.Server, the start() method sets the isRunning flag before calling the run() method. In the event of an initialization error like a port conflict an exception will be thrown at line 136 which is,
> Channel channel = bootstrap.bind(socket);
> It seems like it might make more sense to set the isRunning flag after binding to the socket. I have a tool that deploys a node and then verifies it is ready to receive CQL requests. I do this via JMX. Unless I use a delay before making that check, the JMX call will return true even though there is a port conflict.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira