cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/3] cassandra git commit: Fix LWT requiring all nodes for CAS
Date Sat, 17 Jan 2015 00:43:14 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 895ec3ea1 -> 8c4db1b0e


Fix LWT requiring all nodes for CAS

patch by Anthony Cozzie; reviewed by Aleksey Yeschenko for
CASSANDRA-8640


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

Branch: refs/heads/trunk
Commit: 61bd68885e1a40a8c40522a73bf9d269b58868e9
Parents: 90780b5
Author: Anthony Cozzie <acozzie@datastax.com>
Authored: Sat Jan 17 03:38:46 2015 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Sat Jan 17 03:38:46 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/61bd6888/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 45b2b9c..54a6096 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -28,7 +28,7 @@
  * Fix NPE after dropping a keyspace (CASSANDRA-8332)
  * Fix error message on read repair timeouts (CASSANDRA-7947)
  * Default DTCS base_time_seconds changed to 60 (CASSANDRA-8417)
- * Refuse Paxos operation with more than one pending endpoint (CASSANDRA-8346)
+ * Refuse Paxos operation with more than one pending endpoint (CASSANDRA-8346, 8640)
  * Throw correct exception when trying to bind a keyspace or table
    name (CASSANDRA-6952)
  * Make HHOM.compact synchronized (CASSANDRA-8416)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/61bd6888/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 45af1c8..1fd4079 100644
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@ -314,7 +314,7 @@ public class StorageProxy implements StorageProxyMBean
             pendingEndpoints = ImmutableList.copyOf(Iterables.filter(pendingEndpoints, isLocalDc));
         }
         int participants = pendingEndpoints.size() + naturalEndpoints.size();
-        int requiredParticipants = participants + 1  / 2; // See CASSANDRA-833
+        int requiredParticipants = (participants + 1) / 2; // See CASSANDRA-8346, CASSANDRA-833
         List<InetAddress> liveEndpoints = ImmutableList.copyOf(Iterables.filter(Iterables.concat(naturalEndpoints,
pendingEndpoints), IAsyncCallback.isAlive));
         if (liveEndpoints.size() < requiredParticipants)
             throw new UnavailableException(consistencyForPaxos, requiredParticipants, liveEndpoints.size());


Mime
View raw message