cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcken...@apache.org
Subject [2/3] cassandra git commit: Fix missing cdc flag on Mutation creation
Date Wed, 14 Dec 2016 20:13:47 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/83ba3b7f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/83ba3b7f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/83ba3b7f

Branch: refs/heads/trunk
Commit: 83ba3b7f37b1f1931879d3724b8aef4eb4a1da76
Parents: c9ead48
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:11:50 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/83ba3b7f/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