cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/5] git commit: Allow executing CREATE statement multiple times
Date Wed, 18 Dec 2013 10:24:02 GMT
Updated Branches:
  refs/heads/trunk 6635cde3a -> 1a5ebd6a7


Allow executing CREATE statement multiple times

patch by slebresne; reviewed by jbellis for CASSANDRA-6471


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

Branch: refs/heads/trunk
Commit: 079f1e81166579c5da0bdde76be7c9201d2e1711
Parents: 1b4c9b4
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Wed Dec 18 11:13:54 2013 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Dec 18 11:13:54 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                        | 3 +++
 src/java/org/apache/cassandra/cql3/CFPropDefs.java | 5 +++++
 src/java/org/apache/cassandra/cql3/KSPropDefs.java | 5 +++++
 3 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/079f1e81/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 22a121e..5086440 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,6 @@
+1.2.14
+ * Allow executing CREATE statements multiple times (CASSANDRA-6471)
+
 1.2.13
  * Improved error message on bad properties in DDL queries (CASSANDRA-6453)
  * Randomize batchlog candidates selection (CASSANDRA-6481)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/079f1e81/src/java/org/apache/cassandra/cql3/CFPropDefs.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/CFPropDefs.java b/src/java/org/apache/cassandra/cql3/CFPropDefs.java
index 8ad29fd..d60b60c 100644
--- a/src/java/org/apache/cassandra/cql3/CFPropDefs.java
+++ b/src/java/org/apache/cassandra/cql3/CFPropDefs.java
@@ -76,6 +76,11 @@ public class CFPropDefs extends PropertyDefinitions
 
     public void validate() throws ConfigurationException, SyntaxException
     {
+        // Skip validation if the comapction strategy class is already set as it means we've
alreayd
+        // prepared (and redoing it would set strategyClass back to null, which we don't
want)
+        if (compactionStrategyClass != null)
+            return;
+
         validate(keywords, obsoleteKeywords);
 
         Map<String, String> compactionOptions = getCompactionOptions();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/079f1e81/src/java/org/apache/cassandra/cql3/KSPropDefs.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/KSPropDefs.java b/src/java/org/apache/cassandra/cql3/KSPropDefs.java
index 70df622..e2b0de8 100644
--- a/src/java/org/apache/cassandra/cql3/KSPropDefs.java
+++ b/src/java/org/apache/cassandra/cql3/KSPropDefs.java
@@ -44,6 +44,11 @@ public class KSPropDefs extends PropertyDefinitions
 
     public void validate() throws ConfigurationException, SyntaxException
     {
+        // Skip validation if the strategy class is already set as it means we've alreayd
+        // prepared (and redoing it would set strategyClass back to null, which we don't
want)
+        if (strategyClass != null)
+            return;
+
         validate(keywords, obsoleteKeywords);
 
         Map<String, String> replicationOptions = getReplicationOptions();


Mime
View raw message