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: Ninja-fix CASSANDRA-8640
Date Sat, 17 Jan 2015 01:08:58 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 8c4db1b0e -> 6ba099940


Ninja-fix CASSANDRA-8640


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

Branch: refs/heads/trunk
Commit: ce207cba413381986324f2c8edad9e090e5be5b1
Parents: 61bd688
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Sat Jan 17 04:06:21 2015 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Sat Jan 17 04:06:21 2015 +0300

----------------------------------------------------------------------
 src/java/org/apache/cassandra/service/StorageProxy.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ce207cba/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 1fd4079..fcc9665 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-8346, CASSANDRA-833
+        int requiredParticipants = participants / 2 + 1; // 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