Author: jbellis
Date: Mon Sep 12 17:46:01 2011
New Revision: 1169844

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

Modified:
    cassandra/branches/cassandra-1.0/   (props changed)
    cassandra/branches/cassandra-1.0/CHANGES.txt
    cassandra/branches/cassandra-1.0/NEWS.txt
    cassandra/branches/cassandra-1.0/contrib/   (props changed)
    
cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
   (props changed)
    
cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
   (props changed)
    
cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
   (props changed)
    
cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
   (props changed)
    
cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
   (props changed)
    
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/config/CFMetaData.java
    
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/Memtable.java
    
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/gms/Gossiper.java
    
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
    
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
    
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/utils/SlabAllocator.java
    
cassandra/branches/cassandra-1.0/src/resources/org/apache/cassandra/cli/CliHelp.yaml

Propchange: cassandra/branches/cassandra-1.0/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 12 17:46:01 2011
@@ -1,11 +1,11 @@
 
/cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7:1026516-1163782
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
-/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1166782,1166809
+/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1166782,1166809,1169823
 /cassandra/branches/cassandra-0.8.0:1125021-1130369
 /cassandra/branches/cassandra-0.8.1:1101014-1125018
 /cassandra/branches/cassandra-1.0:1167106,1167185
-/cassandra/branches/cassandra-1.0.0:1167104-1167365
+/cassandra/branches/cassandra-1.0.0:1167104-1169843
 /cassandra/tags/cassandra-0.7.0-rc3:1051699-1053689
 /cassandra/tags/cassandra-0.8.0-rc1:1102511-1125020
 /cassandra/trunk:1167085-1167102

Modified: cassandra/branches/cassandra-1.0/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/CHANGES.txt?rev=1169844&r1=1169843&r2=1169844&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/CHANGES.txt (original)
+++ cassandra/branches/cassandra-1.0/CHANGES.txt Mon Sep 12 17:46:01 2011
@@ -70,7 +70,8 @@
  * fix inconsistency of the CLI syntax when {} should be used instead of [{}]
    (CASSANDRA-3119)
  * rename CQL type names to match expected SQL behavior (CASSANDRA-3149, 3031)
- * Arena-based allocation for memtables (CASSANDRA-2252, 3162, 3163)
+ * Arena-based allocation for memtables (CASSANDRA-2252, 3162, 3163, 3168)
+ * Default RR chance to 0.1 (CASSANDRA-3169)
 
 
 0.8.6

Modified: cassandra/branches/cassandra-1.0/NEWS.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/NEWS.txt?rev=1169844&r1=1169843&r2=1169844&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/NEWS.txt (original)
+++ cassandra/branches/cassandra-1.0/NEWS.txt Mon Sep 12 17:46:01 2011
@@ -11,6 +11,9 @@ Upgrading
     - CQL types bytea and date were renamed to blob and timestamp, 
respectively,
       to conform with SQL norms.  CQL type int is now a 4-byte int, not 8
       (which is still available as bigint).
+    - Cassandra 1.0 uses arena allocation to reduce old generation 
fragmentation.
+      This means there is a minimum overhead of 1MB per ColumnFamily plus
+      1MB per index.
 
 Features
 --------
@@ -29,12 +32,6 @@ Features
     - Ability to use multiple threads during a single compaction.  See 
       multithreaded_compaction in cassandra.yaml for more details.
     - Windows Service ("cassandra.bat install" to enable)
-    - Hinted Handoff has two major improvements:
-        - Hint replay is much more efficient thanks to a change in the data 
model
-        - Hints are created for all replicas that do not ack a write.  
(Formerly,
-          only replicas known to be down when the write started were hinted.)
-      This means that running with read repair completely off is much more
-      viable than before.
     - A dead node may be replaced in a single step by starting a new node
       with -Dcassandra.replace_token=<token>.  More details can be found at
       http://wiki.apache.org/cassandra/Operations#Replacing_a_Dead_Node
@@ -49,10 +46,13 @@ New data types
 
 Other
 -----
-    - Hinted Handoff is substantially more robust, with the result that
-      when HH is enabled, repair only needs to be run if a node crashes.
-    - Because of this, read repair is disabled now by default on newly
-      created ColumnFamilies.
+    - Hinted Handoff has two major improvements:
+        - Hint replay is much more efficient thanks to a change in the data 
model
+        - Hints are created for all replicas that do not ack a write.  
(Formerly,
+          only replicas known to be down when the write started were hinted.)
+      This means that running with read repair completely off is much more
+      viable than before, and the default read_repair_chance is reduced from 
1.0
+      ("always repair") to 0.1 ("repair 10% of the time").
     - The old per-ColumnFamily memtable thresholds
       (memtable_throughput_in_mb, memtable_operations_in_millions,
       memtable_flush_after_mins) are ignored, in favor of the global

Propchange: cassandra/branches/cassandra-1.0/contrib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 12 17:46:01 2011
@@ -1,11 +1,11 @@
 
/cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
 /cassandra/branches/cassandra-0.7/contrib:1026516-1163782
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
-/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1166782,1166809
+/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1166782,1166809,1169823
 /cassandra/branches/cassandra-0.8.0/contrib:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/contrib:1101014-1125018
 /cassandra/branches/cassandra-1.0/contrib:1167106,1167185
-/cassandra/branches/cassandra-1.0.0/contrib:1167104-1167365
+/cassandra/branches/cassandra-1.0.0/contrib:1167104-1169843
 /cassandra/tags/cassandra-0.7.0-rc3/contrib:1051699-1053689
 /cassandra/tags/cassandra-0.8.0-rc1/contrib:1102511-1125020
 /cassandra/trunk/contrib:1167085-1167102

Propchange: 
cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 12 17:46:01 2011
@@ -1,11 +1,11 @@
 
/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-1163782
 
/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-1166782,1166809
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125019-1166782,1166809,1169823
 
/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/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1167106,1167185
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1167104-1167365
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1167104-1169843
 
/cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1051699-1053689
 
/cassandra/tags/cassandra-0.8.0-rc1/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1102511-1125020
 
/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1167085-1167102

Propchange: 
cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 12 17:46:01 2011
@@ -1,11 +1,11 @@
 
/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-1163782
 
/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-1166782,1166809
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090934-1125013,1125019-1166782,1166809,1169823
 
/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/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1167106,1167185
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1167104-1167365
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1167104-1169843
 
/cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1051699-1053689
 
/cassandra/tags/cassandra-0.8.0-rc1/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1102511-1125020
 
/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1167085-1167102

Propchange: 
cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 12 17:46:01 2011
@@ -1,11 +1,11 @@
 
/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-1163782
 
/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-1166782,1166809
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1090934-1125013,1125019-1166782,1166809,1169823
 
/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/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1167106,1167185
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1167104-1167365
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1167104-1169843
 
/cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1051699-1053689
 
/cassandra/tags/cassandra-0.8.0-rc1/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1102511-1125020
 
/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1167085-1167102

Propchange: 
cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 12 17:46:01 2011
@@ -1,11 +1,11 @@
 
/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-1163782
 
/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-1166782,1166809
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1090934-1125013,1125019-1166782,1166809,1169823
 
/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/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1167106,1167185
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1167104-1167365
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1167104-1169843
 
/cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1051699-1053689
 
/cassandra/tags/cassandra-0.8.0-rc1/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1102511-1125020
 
/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1167085-1167102

Propchange: 
cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 12 17:46:01 2011
@@ -1,11 +1,11 @@
 
/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-1163782
 
/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-1166782,1166809
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1090934-1125013,1125019-1166782,1166809,1169823
 
/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/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1167106,1167185
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1167104-1167365
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1167104-1169843
 
/cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1051699-1053689
 
/cassandra/tags/cassandra-0.8.0-rc1/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1102511-1125020
 
/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1167085-1167102

Modified: 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/config/CFMetaData.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/config/CFMetaData.java?rev=1169844&r1=1169843&r2=1169844&view=diff
==============================================================================
--- 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/config/CFMetaData.java
 (original)
+++ 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/config/CFMetaData.java
 Mon Sep 12 17:46:01 2011
@@ -55,7 +55,7 @@ public final class CFMetaData
 
     public final static double DEFAULT_ROW_CACHE_SIZE = 0.0;
     public final static double DEFAULT_KEY_CACHE_SIZE = 200000;
-    public final static double DEFAULT_READ_REPAIR_CHANCE = 1.0;
+    public final static double DEFAULT_READ_REPAIR_CHANCE = 0.1;
     public final static boolean DEFAULT_REPLICATE_ON_WRITE = true;
     public final static int DEFAULT_ROW_CACHE_SAVE_PERIOD_IN_SECONDS = 0;
     public final static int DEFAULT_KEY_CACHE_SAVE_PERIOD_IN_SECONDS = 4 * 
3600;

Modified: 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/Memtable.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/Memtable.java?rev=1169844&r1=1169843&r2=1169844&view=diff
==============================================================================
--- 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/Memtable.java 
(original)
+++ 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/Memtable.java 
Mon Sep 12 17:46:01 2011
@@ -90,7 +90,7 @@ public class Memtable
     {
         // 25% fudge factor on the base throughput * liveRatio calculation.  
(Based on observed
         // pre-slabbing behavior -- not sure what accounts for this. May have 
changed with introduction of slabbing.)
-        return (long) (currentThroughput.get() * cfs.liveRatio * 1.25) + 
allocator.size();
+        return (long) (currentThroughput.get() * cfs.liveRatio * 1.25);
     }
 
     public long getSerializedSize()

Modified: 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/gms/Gossiper.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/gms/Gossiper.java?rev=1169844&r1=1169843&r2=1169844&view=diff
==============================================================================
--- 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/gms/Gossiper.java
 (original)
+++ 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/gms/Gossiper.java
 Mon Sep 12 17:46:01 2011
@@ -213,11 +213,13 @@ public class Gossiper implements IFailur
     
     public void setVersion(InetAddress address, int version)
     {
+        logger.debug("Setting version {} for {}", version, address);
         versions.put(address, version);
     }
     
     public void resetVersion(InetAddress endpoint)
     {
+        logger.debug("Reseting version for {}", endpoint);
         versions.remove(endpoint);
     }
 

Modified: 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/net/IncomingTcpConnection.java?rev=1169844&r1=1169843&r2=1169844&view=diff
==============================================================================
--- 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
 (original)
+++ 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
 Mon Sep 12 17:46:01 2011
@@ -159,6 +159,8 @@ public class IncomingTcpConnection exten
 
     private void close()
     {
+        // reset version here, since we set when starting an incoming socket
+        Gossiper.instance.resetVersion(socket.getInetAddress());
         try
         {
             socket.close();

Modified: 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/net/OutboundTcpConnection.java?rev=1169844&r1=1169843&r2=1169844&view=diff
==============================================================================
--- 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
 (original)
+++ 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
 Mon Sep 12 17:46:01 2011
@@ -197,9 +197,6 @@ public class OutboundTcpConnection exten
             out = null;
             socket = null;
         }
-
-        // when we see the node again, try to connect at the most recent 
protocol we know about
-        Gossiper.instance.resetVersion(endpoint);
     }
 
     private Pair<Message, String> take()

Modified: 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/utils/SlabAllocator.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/utils/SlabAllocator.java?rev=1169844&r1=1169843&r2=1169844&view=diff
==============================================================================
--- 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/utils/SlabAllocator.java
 (original)
+++ 
cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/utils/SlabAllocator.java
 Mon Sep 12 17:46:01 2011
@@ -29,6 +29,8 @@ import java.util.concurrent.atomic.Atomi
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.MapMaker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The SlabAllocator is a bump-the-pointer allocator that allocates
@@ -46,24 +48,13 @@ import com.google.common.collect.MapMake
  */
 public class SlabAllocator extends Allocator
 {
+    private static Logger logger = 
LoggerFactory.getLogger(SlabAllocator.class);
+
     private final static int REGION_SIZE = 1024 * 1024;
     private final static int MAX_CLONED_SIZE = 128 * 1024; // bigger than this 
don't go in the region
 
     private final AtomicReference<Region> currentRegion = new 
AtomicReference<Region>();
-    private final Collection<Region> filledRegions = 
Collections.newSetFromMap(new MapMaker().weakKeys().<Region, Boolean>makeMap());
-
-    /** @return Total number of bytes allocated by this allocator. */
-    public long size()
-    {
-        Iterable<Region> regions = filledRegions;
-        if (currentRegion.get() != null)
-            regions = Iterables.concat(regions, 
Collections.<Region>singleton(currentRegion.get()));
-
-        long total = 0;
-        for (Region region : regions)
-            total += region.size;
-        return total;
-    }
+    private volatile int regionCount;
 
     public ByteBuffer allocate(int size)
     {
@@ -86,23 +77,11 @@ public class SlabAllocator extends Alloc
                 return cloned;
 
             // not enough space!
-            tryRetireRegion(region);
+            currentRegion.compareAndSet(region, null);
         }
     }
     
     /**
-     * Try to retire the current region if it is still <code>region</code>.
-     * Postcondition is that curRegion.get() != region
-     */
-    private void tryRetireRegion(Region region)
-    {
-        if (currentRegion.compareAndSet(region, null))
-        {
-            filledRegions.add(region);
-        }
-    }
-
-    /**
      * Get the current region, or, if there is no current region, allocate a 
new one
      */
     private Region getRegion()
@@ -122,6 +101,8 @@ public class SlabAllocator extends Alloc
             {
                 // we won race - now we need to actually do the expensive 
allocation step
                 region.init();
+                regionCount++;
+                logger.debug("{} regions now allocated in {}", regionCount, 
this);
                 return region;
             }
             // someone else won race - that's fine, we'll try to grab theirs

Modified: 
cassandra/branches/cassandra-1.0/src/resources/org/apache/cassandra/cli/CliHelp.yaml
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/resources/org/apache/cassandra/cli/CliHelp.yaml?rev=1169844&r1=1169843&r2=1169844&view=diff
==============================================================================
--- 
cassandra/branches/cassandra-1.0/src/resources/org/apache/cassandra/cli/CliHelp.yaml
 (original)
+++ 
cassandra/branches/cassandra-1.0/src/resources/org/apache/cassandra/cli/CliHelp.yaml
 Mon Sep 12 17:46:01 2011
@@ -546,22 +546,23 @@ commands:
         follower replicas. Accepts the values true and false.
 
         - row_cache_provider: The provider for the row cache to use for this
-        column family. Defaults to ConcurrentLinkedHashCacheProvider.  .
+        column family. 
 
         Supported values are:
             - ConcurrentLinkedHashCacheProvider
-            - SerializingCacheProvider
+            - SerializingCacheProvider (requires JNA)
 
         It is also valid to specify the fully-qualified class name to a class
         that implements org.apache.cassandra.cache.IRowCacheProvider.
 
-        ConcurrentLinkedHashCacheProvider provides the same features as the 
versions
-        prior to Cassandra v0.8. Row data is cached using the Java JVM heap.
-
-        SerializingCacheProvider serialises the contents of the row and
-        stores the data off the JVM Heap. This may reduce the GC pressure.
-        NOTE: This provider requires JNA.jar to be in the class path to
-        enable native methods.
+        row_cache_provider defaults to ConcurrentLinkedHashCacheProvider, 
+        but if you have JNA installed you should usually use
+        SerializingCacheProvider, which serialises the contents of the
+        row and stores it in native memory, i.e., off the JVM
+        Heap. Serialized rows take significantly less memory than
+        "live" rows in the JVM, so you can cache more rows in a given
+        memory footprint.  And storing the cache off-heap means you
+        can use smaller heap sizes, reducing the impact of GC pauses.
 
         - compression: Use compression for SSTable data files.
 
@@ -818,22 +819,23 @@ commands:
         follower replicas. Accepts the values true and false.
 
         - row_cache_provider: The provider for the row cache to use for this
-        column family. Defaults to ConcurrentLinkedHashCacheProvider.  .
+        column family. 
 
         Supported values are:
             - ConcurrentLinkedHashCacheProvider
-            - SerializingCacheProvider
+            - SerializingCacheProvider (requires JNA)
 
         It is also valid to specify the fully-qualified class name to a class
         that implements org.apache.cassandra.cache.IRowCacheProvider.
 
-        ConcurrentLinkedHashCacheProvider provides the same features as the 
versions
-        prior to Cassandra v0.8. Row data is cached using the Java JVM heap.
-
-        SerializingCacheProvider serialises the contents of the row and
-        stores the data off the JVM Heap. This may reduce the GC pressure.
-        NOTE: Thsi provider requires JNA.jar to be in the class path to
-        enable native methods.
+        row_cache_provider defaults to ConcurrentLinkedHashCacheProvider, 
+        but if you have JNA installed you should usually use
+        SerializingCacheProvider, which serialises the contents of the
+        row and stores it in native memory, i.e., off the JVM
+        Heap. Serialized rows take significantly less memory than
+        "live" rows in the JVM, so you can cache more rows in a given
+        memory footprint.  And storing the cache off-heap means you
+        can use smaller heap sizes, reducing the impact of GC pauses.
 
         - compression: Use compression for SSTable data files. Accepts the 
values true and false.
 
@@ -929,7 +931,7 @@ commands:
           Valid options are:
             - ascii
             - bytes: if used without arguments generates a zero length byte 
array
-            - int32
+            - int
             - integer
             - lexicaluuid: if used without arguments generates a new random 
uuid
             - long
@@ -999,7 +1001,7 @@ commands:
           Valid options are:
             - ascii
             - bytes: if used without arguments generates a zero length byte 
array
-            - int32
+            - int
             - integer
             - lexicaluuid: if used without arguments generates a new random 
uuid
             - long
@@ -1043,7 +1045,7 @@ commands:
            Supported values are:
             - ascii
             - bytes: if used without arguments generates a zero length byte 
array
-            - int32
+            - int
             - integer
             - lexicaluuid: if used without arguments generates a new random 
uuid
             - long
@@ -1148,7 +1150,7 @@ commands:
             - ascii
             - bytes
             - counterColumn (distributed counter column)
-            - int32
+            - int
             - integer (a generic variable-length integer type)
             - lexicalUUID
             - long


Reply via email to