Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-5467

isRunning flag set prematurely in org.apache.cassandra.transport.Server

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.5
    • None
    • Low

    Description

      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.

      Attachments

        1. 5467.txt
          1 kB
          Sylvain Lebresne

        Activity

          People

            slebresne Sylvain Lebresne
            jsanda John Sanda
            Sylvain Lebresne
            Marcus Eriksson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: