cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [3/3] git commit: Make SS.hasSameReplication safer/more readable
Date Tue, 28 Feb 2012 10:20:01 GMT
Make SS.hasSameReplication safer/more readable

patch by dbrosius; reviewed by slebresne for CASSANDRA-3971


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

Branch: refs/heads/trunk
Commit: 24939a58b381589461677e03c2b19a2035d9c727
Parents: 449e037
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Feb 28 10:49:29 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Feb 28 10:49:29 2012 +0100

----------------------------------------------------------------------
 .../apache/cassandra/service/StorageService.java   |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/24939a58/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 9ae666c..d50e21e 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2670,10 +2670,11 @@ public class StorageService implements IEndpointStateChangeSubscriber,
StorageSe
     {
         if (list.isEmpty())
             return false;
+
         for (int i = 0; i < list.size() -1; i++)
         {
-            KSMetaData ksm1 = Schema.instance.getKSMetaData(Schema.instance.getNonSystemTables().get(i));
-            KSMetaData ksm2 = Schema.instance.getKSMetaData(Schema.instance.getNonSystemTables().get(i
+ 1));
+            KSMetaData ksm1 = Schema.instance.getKSMetaData(list.get(i));
+            KSMetaData ksm2 = Schema.instance.getKSMetaData(list.get(i + 1));
             if (!ksm1.strategyClass.equals(ksm2.strategyClass) ||
                     !Iterators.elementsEqual(ksm1.strategyOptions.entrySet().iterator(),
                                              ksm2.strategyOptions.entrySet().iterator()))


Mime
View raw message