cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhu han (JIRA)" <j...@apache.org>
Subject [jira] Created: (CASSANDRA-12) Gossiper should set the Node is dead when notifies the subscriber
Date Thu, 26 Mar 2009 05:47:51 GMT
Gossiper should set the Node is dead when notifies the subscriber
-----------------------------------------------------------------

                 Key: CASSANDRA-12
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12
             Project: Cassandra
          Issue Type: Bug
            Reporter: zhu han


When the gossiper is notified by Failure Detector that one node is dead, it would tell the
storage service by the onChange() cacallback. However, the gossiper doesn't set the EndPointState
to be dead. Please check following code snippet from Gossiper.java
    public void suspect(EndPoint endpoint)
    {
        EndPointState epState = endPointStateMap_.get(endpoint);
        if ( epState.isAlive() )
        {
            logger_.info("EndPoint " + endpoint + " is now dead.");
            isAlive(endpoint, epState, false);

            /* Notify an endpoint is dead to interested parties. */
            EndPointState deltaState = new EndPointState(epState.getHeartBeatState());
           /* add deltaState.isAlive(false); here */
            doNotifications(endpoint, deltaState);
        }

And the storage service would detect it as the node comes back after network partition and
start a hinted transmit. Please see the code snippet in StorageService.java
        else --> if( nodeIdState == null)
        {
            /*
             * If we are here and if this node is UP and already has an entry
             * in the token map. It means that the node was behind a network partition.
            */
            if ( epState.isAlive() && tokenMetadata_.isKnownEndPoint(endpoint) )
            {
                logger_.debug("EndPoint " + ep + " just recovered from a partition. Sending
hinted data.");
                doBootstrap(ep, BootstrapMode.HINT);
            }
        }



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message