cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcken...@apache.org
Subject [2/6] cassandra git commit: Fix missing cdc flag on Mutation creation
Date Wed, 14 Dec 2016 20:22:56 GMT
Fix missing cdc flag on Mutation creation

Patch by jmckenzie; reviewed by blambov for CASSANDRA-13035


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

Branch: refs/heads/cassandra-3.X
Commit: 249e4b195de0d5351c4bfdd600bcd74b4fa085a5
Parents: 66e2145
Author: Joshua McKenzie <jmckenzie@apache.org>
Authored: Mon Dec 12 15:30:37 2016 -0500
Committer: Joshua McKenzie <jmckenzie@apache.org>
Committed: Wed Dec 14 15:21:27 2016 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/Mutation.java | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/249e4b19/src/java/org/apache/cassandra/db/Mutation.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Mutation.java b/src/java/org/apache/cassandra/db/Mutation.java
index b08d6e5..00a637e 100644
--- a/src/java/org/apache/cassandra/db/Mutation.java
+++ b/src/java/org/apache/cassandra/db/Mutation.java
@@ -78,6 +78,8 @@ public class Mutation implements IMutation
         this.keyspaceName = keyspaceName;
         this.key = key;
         this.modifications = modifications;
+        for (PartitionUpdate pu : modifications.values())
+            cdcEnabled |= pu.metadata().params.cdc;
     }
 
     public Mutation copy()
@@ -92,6 +94,11 @@ public class Mutation implements IMutation
 
         Mutation copy = copy();
         copy.modifications.keySet().removeAll(cfIds);
+
+        copy.cdcEnabled = false;
+        for (PartitionUpdate pu : modifications.values())
+            copy.cdcEnabled |= pu.metadata().params.cdc;
+
         return copy;
     }
 


Mime
View raw message