cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [2/3] git commit: correct unit, avoid overflow
Date Fri, 18 Oct 2013 19:49:59 GMT
correct unit, avoid overflow


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/db275f40
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/db275f40
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/db275f40

Branch: refs/heads/trunk
Commit: db275f4075dd9b870bd30ee7deccbb072c625a03
Parents: 2bc30e4
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Fri Oct 18 14:48:17 2013 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Fri Oct 18 14:48:17 2013 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/service/StorageService.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/db275f40/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 62f0907..4916cbd 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -685,7 +685,8 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
                         InetAddress existing = tokenMetadata.getEndpoint(token);
                         if (existing != null)
                         {
-                            if (Gossiper.instance.getEndpointStateForEndpoint(existing).getUpdateTimestamp()
> (System.nanoTime() - delay*1000))
+                            long nanoDelay = delay * 1000000;
+                            if (Gossiper.instance.getEndpointStateForEndpoint(existing).getUpdateTimestamp()
> (System.nanoTime() - nanoDelay))
                                 throw new UnsupportedOperationException("Cannnot replace
a live node... ");
                             current.add(existing);
                         }


Mime
View raw message