cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r767606 - /incubator/cassandra/trunk/src/org/apache/cassandra/gms/Gossiper.java
Date Wed, 22 Apr 2009 18:38:33 GMT
Author: jbellis
Date: Wed Apr 22 18:38:33 2009
New Revision: 767606

URL: http://svn.apache.org/viewvc?rev=767606&view=rev
Log:
fix duration calculation to avoid evicting dead endpoints instantly

Modified:
    incubator/cassandra/trunk/src/org/apache/cassandra/gms/Gossiper.java

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/gms/Gossiper.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/gms/Gossiper.java?rev=767606&r1=767605&r2=767606&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/gms/Gossiper.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/gms/Gossiper.java Wed Apr 22 18:38:33
2009
@@ -470,7 +470,6 @@
 
     void doStatusCheck()
     {
-        long now = System.currentTimeMillis();
         Set<EndPoint> eps = endPointStateMap_.keySet();
 
         for ( EndPoint endpoint : eps )
@@ -482,8 +481,7 @@
             EndPointState epState = endPointStateMap_.get(endpoint);
             if ( epState != null )
             {
-                long l = now - epState.getUpdateTimestamp();
-                long duration = now - l;
+                long duration = System.currentTimeMillis() - epState.getUpdateTimestamp();
                 if ( !epState.isAlive() && (duration > aVeryLongTime_) )
                 {
                     evictFromMembership(endpoint);



Mime
View raw message