cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cassandra git commit: Add experimental flag to disable MV coordinator batchlog
Date Fri, 28 Aug 2015 15:05:32 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 c73ec67c0 -> fcdf191f5


Add experimental flag to disable MV coordinator batchlog


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

Branch: refs/heads/cassandra-3.0
Commit: fcdf191f51572d60df3b889fd11ad37db8c1503a
Parents: c73ec67
Author: T Jake Luciani <jake@apache.org>
Authored: Fri Aug 28 11:05:07 2015 -0400
Committer: T Jake Luciani <jake@apache.org>
Committed: Fri Aug 28 11:05:15 2015 -0400

----------------------------------------------------------------------
 .../apache/cassandra/db/view/MaterializedViewManager.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fcdf191f/src/java/org/apache/cassandra/db/view/MaterializedViewManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/view/MaterializedViewManager.java b/src/java/org/apache/cassandra/db/view/MaterializedViewManager.java
index 5184d8d..6c108a2 100644
--- a/src/java/org/apache/cassandra/db/view/MaterializedViewManager.java
+++ b/src/java/org/apache/cassandra/db/view/MaterializedViewManager.java
@@ -59,6 +59,7 @@ import org.apache.cassandra.service.StorageService;
 public class MaterializedViewManager
 {
     private static final Striped<Lock> LOCKS = Striped.lazyWeakLock(DatabaseDescriptor.getConcurrentWriters()
* 1024);
+    private static final boolean disableCoordinatorBatchlog = Boolean.getBoolean("cassandra.mv_disble_coordinator_batchlog");
 
     private final ConcurrentNavigableMap<String, MaterializedView> viewsByName;
 
@@ -197,15 +198,18 @@ public class MaterializedViewManager
         return null;
     }
 
-    public static boolean updatesAffectView(Collection<? extends IMutation> mutations,
boolean ignoreRf1)
+    public static boolean updatesAffectView(Collection<? extends IMutation> mutations,
boolean coordinatorBatchlog)
     {
+        if (coordinatorBatchlog && disableCoordinatorBatchlog)
+            return false;
+
         for (IMutation mutation : mutations)
         {
             for (PartitionUpdate cf : mutation.getPartitionUpdates())
             {
                 Keyspace keyspace = Keyspace.open(cf.metadata().ksName);
 
-                if (ignoreRf1 && keyspace.getReplicationStrategy().getReplicationFactor()
== 1)
+                if (coordinatorBatchlog && keyspace.getReplicationStrategy().getReplicationFactor()
== 1)
                     continue;
 
                 MaterializedViewManager viewManager = keyspace.getColumnFamilyStore(cf.metadata().cfId).materializedViewManager;


Mime
View raw message