cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [6/7] git commit: fix CAS contention timeout patch by Soumava Ghosh; reviewed by jbellis for CASSANDRA-5830
Date Mon, 05 Aug 2013 21:43:19 GMT
fix CAS contention timeout
patch by Soumava Ghosh; reviewed by jbellis for CASSANDRA-5830


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

Branch: refs/heads/cassandra-2.0
Commit: 4b4ccc3ccfcc7be8fad0b25bde9a180f0016d520
Parents: c0d189f
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Mon Aug 5 16:42:59 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Mon Aug 5 16:42:59 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                             | 4 ++++
 src/java/org/apache/cassandra/service/StorageProxy.java | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b4ccc3c/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c83372b..67227a1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.0.0
+ * fix CAS contention timeout (CASSANDRA-5830)
+
+
 2.0.0-rc1
  * improve DecimalSerializer performance (CASSANDRA-5837)
  * fix potential spurious wakeup in AsyncOneResponse (CASSANDRA-5690)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b4ccc3c/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java b/src/java/org/apache/cassandra/service/StorageProxy.java
index 6d0d060..fb5cbe4 100644
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@ -355,7 +355,7 @@ public class StorageProxy implements StorageProxyMBean
         long timeout = TimeUnit.MILLISECONDS.toNanos(DatabaseDescriptor.getCasContentionTimeout());
 
         PrepareCallback summary = null;
-        while (start - System.nanoTime() < timeout)
+        while (System.nanoTime() - start < timeout)
         {
             long ballotMillis = summary == null
                               ? System.currentTimeMillis()


Mime
View raw message