cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1156265 - in /cassandra/trunk: ./ contrib/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/config/ src/java/org/apache/cassandra/cql/ src/java/org/apache/cassandra/net/ test/system/
Date Wed, 10 Aug 2011 17:04:40 GMT
Author: jbellis
Date: Wed Aug 10 17:04:39 2011
New Revision: 1156265

URL: http://svn.apache.org/viewvc?rev=1156265&view=rev
Log:
merge from 0.8

Modified:
    cassandra/trunk/   (props changed)
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/NEWS.txt
    cassandra/trunk/contrib/   (props changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java 
 (props changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java   (props
changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
  (props changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
  (props changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
  (props changed)
    cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java
    cassandra/trunk/src/java/org/apache/cassandra/cql/Cql.g
    cassandra/trunk/src/java/org/apache/cassandra/net/MessagingService.java
    cassandra/trunk/test/system/test_cql.py

Propchange: cassandra/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 10 17:04:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7:1026516-1151306
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
-/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1155460,1155548,1156221
+/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1156264
 /cassandra/branches/cassandra-0.8.0:1125021-1130369
 /cassandra/branches/cassandra-0.8.1:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3:1051699-1053689

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1156265&r1=1156264&r2=1156265&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Wed Aug 10 17:04:39 2011
@@ -36,7 +36,10 @@
  * use JAVA env var in cassandra-env.sh (CASSANDRA-2785, 2992)
  * avoid doing read for no-op replicate-on-write at CL=1 (CASSANDRA-2892)
  * refuse counter write for CL.ANY (CASSANDRA-2990)
- * force to always deseriale RowMutation for counters (CASSANDRA-3006)
+ * switch back to only logging recent dropped messages (CASSANDRA-3004)
+ * fix issues with parameters being escaped incorrectly in Python CQL (CASSANDRA-2993)
+ * always deserialize RowMutation for counters (CASSANDRA-3006)
+ * ignore saved replication_factor strategy_option for NTS (CASSANDRA-3011)
 
 
 0.8.3

Modified: cassandra/trunk/NEWS.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/NEWS.txt?rev=1156265&r1=1156264&r2=1156265&view=diff
==============================================================================
--- cassandra/trunk/NEWS.txt (original)
+++ cassandra/trunk/NEWS.txt Wed Aug 10 17:04:39 2011
@@ -7,6 +7,21 @@ Upgrading
       sstableloader tool instead.
 
 
+0.8.4
+=====
+
+Upgrading
+---------
+    - Nothing specific to 0.8.4
+
+Other
+-----
+    - This release comes to fix a bug in counter that could lead to
+      (important) over-count.
+    - It also fixes a slight upgrade regression from 0.8.3. It is thus advised
+      to jump directly to 0.8.4 if upgrading from before 0.8.3.
+
+
 0.8.3
 =====
 

Propchange: cassandra/trunk/contrib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 10 17:04:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
 /cassandra/branches/cassandra-0.7/contrib:1026516-1151306
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
-/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1155460,1155548,1156221
+/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1156264
 /cassandra/branches/cassandra-0.8.0/contrib:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/contrib:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3/contrib:1051699-1053689

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 10 17:04:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1151306
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125019-1155460,1155548,1156221
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125019-1156264
 /cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1051699-1053689

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 10 17:04:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1151306
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090934-1125013,1125019-1155460,1155548,1156221
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090934-1125013,1125019-1156264
 /cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1051699-1053689

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 10 17:04:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1026516-1151306
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1090934-1125013,1125019-1155460,1155548,1156221
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1090934-1125013,1125019-1156264
 /cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1051699-1053689

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 10 17:04:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1026516-1151306
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1090934-1125013,1125019-1155460,1155548,1156221
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1090934-1125013,1125019-1156264
 /cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1051699-1053689

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 10 17:04:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1026516-1151306
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1090934-1125013,1125019-1155460,1155548,1156221
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1090934-1125013,1125019-1156264
 /cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1051699-1053689

Modified: cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java?rev=1156265&r1=1156264&r2=1156265&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java Wed Aug 10 17:04:39
2011
@@ -144,7 +144,7 @@ public final class KSMetaData
 
     public static KSMetaData inflate(org.apache.cassandra.db.migration.avro.KsDef ks)
     {
-        Class<AbstractReplicationStrategy> repStratClass;
+        Class<? extends AbstractReplicationStrategy> repStratClass;
         try
         {
             String strategyClassName = convertOldStrategyName(ks.strategy_class.toString());
@@ -160,7 +160,16 @@ public final class KSMetaData
         {
             for (Map.Entry<CharSequence, CharSequence> e : ks.strategy_options.entrySet())
             {
-                strategyOptions.put(e.getKey().toString(), e.getValue().toString());
+                String name = e.getKey().toString();
+                // Silently discard a replication_factor option to NTS.
+                // The history is, people were creating CFs with the default settings (which
in the CLI is NTS) and then
+                // giving it a replication_factor option, which is nonsensical.  Initially
our strategy was to silently
+                // ignore this option, but that turned out to confuse people more.  So in
0.8.2 we switched to throwing
+                // an exception in the NTS constructor, which would be turned into an InvalidRequestException
for the
+                // client.  But, it also prevented startup for anyone upgrading without first
cleaning that option out.
+                if (repStratClass == NetworkTopologyStrategy.class && name.trim().toLowerCase().equals("replication_factor"))
+                    continue;
+                strategyOptions.put(name, e.getValue().toString());
             }
         }
         maybeAddReplicationFactor(strategyOptions, ks.strategy_class.toString(), ks.replication_factor);

Modified: cassandra/trunk/src/java/org/apache/cassandra/cql/Cql.g
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cql/Cql.g?rev=1156265&r1=1156264&r2=1156265&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cql/Cql.g (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cql/Cql.g Wed Aug 10 17:04:39 2011
@@ -555,7 +555,7 @@ fragment Z: ('z'|'Z');
 STRING_LITERAL
     : '\''
       { StringBuilder b = new StringBuilder(); }
-      ( c=~('\''|'\r'|'\n') { b.appendCodePoint(c);}
+      ( c=~('\'') { b.appendCodePoint(c);}
       | '\'' '\''            { b.appendCodePoint('\'');}
       )*
       '\''

Modified: cassandra/trunk/src/java/org/apache/cassandra/net/MessagingService.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/net/MessagingService.java?rev=1156265&r1=1156264&r2=1156265&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/net/MessagingService.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/net/MessagingService.java Wed Aug 10 17:04:39
2011
@@ -101,18 +101,11 @@ public final class MessagingService impl
     private final Map<StorageService.Verb, AtomicInteger> droppedMessages = new EnumMap<StorageService.Verb,
AtomicInteger>(StorageService.Verb.class);
     // dropped count when last requested for the Recent api.  high concurrency isn't necessary
here.
     private final Map<StorageService.Verb, Integer> lastDropped = Collections.synchronizedMap(new
EnumMap<StorageService.Verb, Integer>(StorageService.Verb.class));
+    private final Map<StorageService.Verb, Integer> lastDroppedInternal = new EnumMap<StorageService.Verb,
Integer>(StorageService.Verb.class);
 
     private final List<ILatencySubscriber> subscribers = new ArrayList<ILatencySubscriber>();
     private static final long DEFAULT_CALLBACK_TIMEOUT = (long) (1.1 * DatabaseDescriptor.getRpcTimeout());
 
-    {
-        for (StorageService.Verb verb : DROPPABLE_VERBS)
-        {
-            droppedMessages.put(verb, new AtomicInteger());
-            lastDropped.put(verb, 0);
-        }
-    }
-
     private static class MSHandle
     {
         public static final MessagingService instance = new MessagingService();
@@ -124,6 +117,13 @@ public final class MessagingService impl
 
     private MessagingService()
     {
+        for (StorageService.Verb verb : DROPPABLE_VERBS)
+        {
+            droppedMessages.put(verb, new AtomicInteger());
+            lastDropped.put(verb, 0);
+            lastDroppedInternal.put(verb, 0);
+        }
+
         listenGate = new SimpleCondition();
         verbHandlers_ = new EnumMap<StorageService.Verb, IVerbHandler>(StorageService.Verb.class);
         streamExecutor_ = new DebuggableThreadPoolExecutor("Streaming", DatabaseDescriptor.getCompactionThreadPriority());
@@ -539,11 +539,13 @@ public final class MessagingService impl
         for (Map.Entry<StorageService.Verb, AtomicInteger> entry : droppedMessages.entrySet())
         {
             AtomicInteger dropped = entry.getValue();
-            if (dropped.get() > 0)
+            StorageService.Verb verb = entry.getKey();
+            int recent = dropped.get() - lastDroppedInternal.get(verb);
+            if (recent > 0)
             {
                 logTpstats = true;
-                logger_.info("{} {} messages dropped in server lifetime",
-                             dropped, entry.getKey());
+                logger_.info("{} {} messages dropped in server lifetime", recent, verb);
+                lastDroppedInternal.put(verb, dropped.get());
             }
         }
 

Modified: cassandra/trunk/test/system/test_cql.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/system/test_cql.py?rev=1156265&r1=1156264&r2=1156265&view=diff
==============================================================================
--- cassandra/trunk/test/system/test_cql.py (original)
+++ cassandra/trunk/test/system/test_cql.py Wed Aug 10 17:04:39 2011
@@ -720,7 +720,25 @@ class TestCql(ThriftTester):
         assert len(r) == 1, "wrong number of results"
         d = cursor.description
         assert d[0][0] == "x'and'y"
-        
+
+    def test_newline_strings(self):
+        "reading and writing strings w/ newlines"
+        cursor = init()
+
+        cursor.execute("""
+                       UPDATE StandardString1 SET :name = :val WHERE KEY = :key;
+                       """, {"key": "\nkey", "name": "\nname", "val": "\nval"})
+
+        cursor.execute("""
+                       SELECT :name FROM StandardString1 WHERE KEY = :key
+                       """, {"key": "\nkey", "name": "\nname"})
+        assert cursor.rowcount == 1
+        r = cursor.fetchone()
+        assert len(r) == 1, "wrong number of results"
+        d = cursor.description
+        assert d[0][0] == "\nname"
+        assert r[0] == "\nval"
+
     def test_typed_keys(self):
         "using typed keys"
         cursor = init()



Mime
View raw message