incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manu Zhang <owenzhang1...@gmail.com>
Subject notifyFailureDetector gets the same object for localEndpointState and remoteEndpointState
Date Sat, 05 Jan 2013 11:48:33 GMT
So another question on Gossip codes of Cassandra-1.2-snapshot.

When a node receives a GossipSynDigest, GossipDigestSynVerbHandler handles
it. It will notify the FailureDetector with the call

Gossiper.instance.notifyFailureDetector(gDigestList);

which will invoke

   void notifyFailureDetector(List<GossipDigest> gDigests)
    {
        for ( GossipDigest gDigest : gDigests )
        {
            notifyFailureDetector(gDigest.endpoint,
endpointStateMap.get(gDigest.endpoint));
        }
    }

and finally
    void notifyFailureDetector(InetAddress endpoint, EndpointState
remoteEndpointState)
    {
        EndpointState localEndpointState = endpointStateMap.get(endpoint);
        ...
   }

It's a weird that remoteEndpointState is "get" from the local
endpointStateMap and references the same object as localEndpoint. Then
there will be no difference for generation and maxVersion and the following
codes look meaningless for a GossipSynDigest.

I started to follow Cassandra from 1.2-beta so I don't know what happened
before that and whether this is a repeated question. So any links will be
helpful.

Thanks

Manu Zhang

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message