cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/4] git commit: Fix #4329
Date Wed, 04 Jul 2012 11:24:36 GMT
Updated Branches:
  refs/heads/trunk bbfab669f -> e7d323009


Fix #4329

patch by slebresne; reviewed by xedin for CASSANDRA-4329


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

Branch: refs/heads/trunk
Commit: e7d323009526fd3ef7347537eddb168809cbc5a6
Parents: a0c9a01
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Wed Jul 4 13:23:52 2012 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Jul 4 13:23:52 2012 +0200

----------------------------------------------------------------------
 .../org/apache/cassandra/service/StorageProxy.java |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7d32300/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 b087b3d..8ae063b 100644
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@ -587,6 +587,14 @@ public class StorageProxy implements StorageProxyMBean
         };
     }
 
+    private static boolean systemTableQuery(List<ReadCommand> cmds)
+    {
+        for (ReadCommand cmd : cmds)
+            if (!cmd.table.equals(Table.SYSTEM_TABLE))
+                return false;
+        return true;
+    }
+
     /**
      * Performs the actual reading of a row out of the StorageService, fetching
      * a specific set of column names from a given column family.
@@ -594,7 +602,7 @@ public class StorageProxy implements StorageProxyMBean
     public static List<Row> read(List<ReadCommand> commands, ConsistencyLevel
consistency_level)
             throws IOException, UnavailableException, TimeoutException, InvalidRequestException
     {
-        if (StorageService.instance.isBootstrapMode())
+        if (StorageService.instance.isBootstrapMode() && !systemTableQuery(commands))
         {
             ClientRequestMetrics.readUnavailables.inc();
             throw new UnavailableException();


Mime
View raw message