cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1142725 - in /cassandra/branches/cassandra-0.8: CHANGES.txt src/java/org/apache/cassandra/cli/CliClient.java
Date Mon, 04 Jul 2011 16:20:15 GMT
Author: jbellis
Date: Mon Jul  4 16:20:14 2011
New Revision: 1142725

URL: http://svn.apache.org/viewvc?rev=1142725&view=rev
Log:
fix CLI perpetuating obsolete KsDef.replication_factor
patch by jbellis; tested by Jonas Borgström for CASSANDRA-2846

Modified:
    cassandra/branches/cassandra-0.8/CHANGES.txt
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1142725&r1=1142724&r2=1142725&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Mon Jul  4 16:20:14 2011
@@ -13,6 +13,7 @@
  * Correctly set default for replicate_on_write (CASSANDRA-2835)
  * improve nodetool compactionstats formatting (CASSANDRA-2844)
  * fix index-building status display (CASSANDRA-2853)
+ * fix CLI perpetuating obsolete KsDef.replication_factor (CASSANDRA-2846)
 
 
 0.8.1

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java?rev=1142725&r1=1142724&r2=1142725&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java (original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java Mon
Jul  4 16:20:14 2011
@@ -1072,7 +1072,10 @@ public class CliClient
     private KsDef updateKsDefAttributes(Tree statement, KsDef ksDefToUpdate)
     {
         KsDef ksDef = new KsDef(ksDefToUpdate);
-        
+        // server helpfully sets deprecated replication factor when it sends a KsDef back,
for older clients.
+        // we need to unset that on the new KsDef we create to avoid being treated as a legacy
client in return.
+        ksDef.unsetReplication_factor();
+
         // removing all column definitions - thrift system_update_keyspace method requires
that 
         ksDef.setCf_defs(new LinkedList<CfDef>());
         



Mime
View raw message