cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r945329 - in /cassandra/trunk: ./ interface/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/cache/ src/java/org/apache/cassandra/io/sstable/
Date Mon, 17 May 2010 19:39:22 GMT
Author: jbellis
Date: Mon May 17 19:39:22 2010
New Revision: 945329

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

Modified:
    cassandra/trunk/   (props changed)
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/interface/cassandra.thrift
    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/cache/InstrumentedCache.java
    cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableTracker.java

Propchange: cassandra/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 17 19:39:22 2010
@@ -1,4 +1,4 @@
-/cassandra/branches/cassandra-0.6:922689-944927
+/cassandra/branches/cassandra-0.6:922689-945318
 /incubator/cassandra/branches/cassandra-0.3:774578-796573
 /incubator/cassandra/branches/cassandra-0.4:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5:888872-915439

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=945329&r1=945328&r2=945329&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Mon May 17 19:39:22 2010
@@ -45,6 +45,8 @@ dev
    finished (CASSANDRA-1076)
  * added Collections.shuffle(splits) before returning the splits in 
    ColumnFamilyInputFormat (CASSANDRA-1096)
+ * do not recalculate cache capacity post-compaction if it's been manually 
+   modified (CASSANDRA-1079)
 
 
 0.6.1

Modified: cassandra/trunk/interface/cassandra.thrift
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/cassandra.thrift?rev=945329&r1=945328&r2=945329&view=diff
==============================================================================
--- cassandra/trunk/interface/cassandra.thrift (original)
+++ cassandra/trunk/interface/cassandra.thrift Mon May 17 19:39:22 2010
@@ -199,7 +199,7 @@ struct ColumnPath {
                   must a valid value under the rules of the Comparator defined for the given
ColumnFamily.
     @param finish. The column name to stop the slice at. This attribute is not required,
though there is no default value,
                    and can be safely set to an empty byte array to not stop until 'count'
results are seen. Otherwise, it
-                   must also be a value value to the ColumnFamily Comparator.
+                   must also be a valid value to the ColumnFamily Comparator.
     @param reversed. Whether the results should be ordered in reversed order. Similar to
ORDER BY blah DESC in SQL.
     @param count. How many keys to return. Similar to LIMIT 100 in SQL. May be arbitrarily
large, but Thrift will
                   materialize the whole result into memory before returning it to the client,
so be aware that you may

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 17 19:39:22 2010
@@ -1,4 +1,4 @@
-/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-944927
+/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-945318
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/Cassandra.java:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Cassandra.java:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/Cassandra.java:888872-903502

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 17 19:39:22 2010
@@ -1,4 +1,4 @@
-/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-944927
+/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-945318
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/column_t.java:774578-792198
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Column.java:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/Column.java:888872-903502

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 17 19:39:22 2010
@@ -1,4 +1,4 @@
-/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-944927
+/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-945318
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:888872-903502

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 17 19:39:22 2010
@@ -1,4 +1,4 @@
-/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:922689-944927
+/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:922689-945318
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:888872-903502

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 17 19:39:22 2010
@@ -1,4 +1,4 @@
-/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:922689-944927
+/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:922689-945318
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/superColumn_t.java:774578-792198
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/SuperColumn.java:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/SuperColumn.java:888872-903502

Modified: cassandra/trunk/src/java/org/apache/cassandra/cache/InstrumentedCache.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cache/InstrumentedCache.java?rev=945329&r1=945328&r2=945329&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cache/InstrumentedCache.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cache/InstrumentedCache.java Mon May 17
19:39:22 2010
@@ -33,6 +33,7 @@ public class InstrumentedCache<K, V>
     private final AtomicLong hits = new AtomicLong(0);
     private final AtomicLong lastRequests = new AtomicLong(0);
     private final AtomicLong lastHits = new AtomicLong(0);
+    private volatile boolean capacityModified;
 
     public InstrumentedCache(int capacity)
     {
@@ -69,10 +70,16 @@ public class InstrumentedCache<K, V>
         return capacity;
     }
 
+    public boolean isCapacityModified()
+    {
+        return capacityModified;
+    }
+
     public void setCapacity(int capacity)
     {
         map.setCapacity(capacity);
         this.capacity = capacity;
+        capacityModified = true;
      }
 
     public int getSize()

Modified: cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableTracker.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableTracker.java?rev=945329&r1=945328&r2=945329&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableTracker.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableTracker.java Mon May 17
19:39:22 2010
@@ -99,22 +99,28 @@ public class SSTableTracker implements I
     public synchronized void updateCacheSizes()
     {
         long keys = estimatedKeys();
-        
-        int keyCacheSize = DatabaseDescriptor.getKeysCachedFor(ksname, cfname, keys);
-        if (keyCacheSize != keyCache.getCapacity())
+
+        if (!keyCache.isCapacityModified())
         {
-            // update cache size for the new key volume
-            if (logger.isDebugEnabled())
-                logger.debug("key cache capacity for " + cfname + " is " + keyCacheSize);
-            keyCache.setCapacity(keyCacheSize);
+            int keyCacheSize = DatabaseDescriptor.getKeysCachedFor(ksname, cfname, keys);
+            if (keyCacheSize != keyCache.getCapacity())
+            {
+                // update cache size for the new key volume
+                if (logger.isDebugEnabled())
+                    logger.debug("key cache capacity for " + cfname + " is " + keyCacheSize);
+                keyCache.setCapacity(keyCacheSize);
+            }
         }
 
-        int rowCacheSize = DatabaseDescriptor.getRowsCachedFor(ksname, cfname, keys);
-        if (rowCacheSize != rowCache.getCapacity())
-        {   
-            if (logger.isDebugEnabled())
-                logger.debug("row cache capacity for " + cfname + " is " + rowCacheSize);
-            rowCache.setCapacity(rowCacheSize);
+        if (!rowCache.isCapacityModified())
+        {
+            int rowCacheSize = DatabaseDescriptor.getRowsCachedFor(ksname, cfname, keys);
+            if (rowCacheSize != rowCache.getCapacity())
+            {
+                if (logger.isDebugEnabled())
+                    logger.debug("row cache capacity for " + cfname + " is " + rowCacheSize);
+                rowCache.setCapacity(rowCacheSize);
+            }
         }
     }
 



Mime
View raw message