cassandra-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=767609&view=rev
Log:
avoid setting the initial arrival time (and hence the mean arrival time until the
next value) to zero.
patch by Zhu Han; reviewed by jbellis for #13

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

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/gms/FailureDetector.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/gms/FailureDetector.java?rev=767609&r1=767608&r2=767609&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/gms/FailureDetector.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/gms/FailureDetector.java Wed Apr 22
18:40:33 2009
@@ -250,11 +250,15 @@
             arrivalIntervals_.remove(0);            
         }
         
-        double interArrivalTime = 0;
+        double interArrivalTime;
         if ( tLast_ > 0L )
         {                        
             interArrivalTime = (value - tLast_);            
-        }   
+        }
+        else
+        {
+            interArrivalTime = Gossiper.intervalInMillis_ / 2;
+        }
         tLast_ = value;            
         arrivalIntervals_.add(interArrivalTime);        
     }

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=767609&r1=767608&r2=767609&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:40:33
2009
@@ -99,7 +99,7 @@
     final static String GOSSIP_DIGEST_ACK_VERB = "GAV";
     /* GA2V - abbreviation for GOSSIP-DIGEST-ACK2-VERB */
     final static String GOSSIP_DIGEST_ACK2_VERB = "GA2V";
-    private final static int intervalInMillis_ = 1000;
+    final static int intervalInMillis_ = 1000;
     private static Logger logger_ = Logger.getLogger(Gossiper.class);
     static Gossiper gossiper_;
 



Mime
View raw message