cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [4/6] git commit: merge from 1.2
Date Tue, 17 Sep 2013 17:14:39 GMT
merge from 1.2


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

Branch: refs/heads/trunk
Commit: 83b0b2fb5b60e4104b2b691185263e067ada3563
Parents: 56b5c6f dc95c8c
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Tue Sep 17 12:10:27 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Tue Sep 17 12:12:04 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                     |   3 +-
 conf/cassandra.yaml                             |   6 +-
 .../org/apache/cassandra/config/Config.java     |   1 +
 .../cassandra/config/DatabaseDescriptor.java    |   8 +-
 .../apache/cassandra/db/ColumnFamilyStore.java  |   4 +-
 src/java/org/apache/cassandra/db/Memtable.java  | 133 ++++++++++---------
 .../org/apache/cassandra/db/MeteredFlusher.java |  22 ++-
 .../PeriodicCommitLogExecutorService.java       |   2 +-
 .../apache/cassandra/utils/StatusLogger.java    |   9 +-
 9 files changed, 107 insertions(+), 81 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b0b2fb/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index f48fb5c,fb4f3f4..2192fe9
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,26 -1,6 +1,27 @@@
 -1.2.10
 +2.0.1
 + * Improve error message when yaml contains invalid properties (CASSANDRA-5958)
 + * Improve leveled compaction's ability to find non-overlapping L0 compactions
 +   to work on concurrently (CASSANDRA-5921)
 + * Notify indexer of columns shadowed by range tombstones (CASSANDRA-5614)
 + * Log Merkle tree stats (CASSANDRA-2698)
 + * Switch from crc32 to adler32 for compressed sstable checksums (CASSANDRA-5862)
 + * Improve offheap memcpy performance (CASSANDRA-5884)
 + * Use a range aware scanner for cleanup (CASSANDRA-2524)
 + * Cleanup doesn't need to inspect sstables that contain only local data 
 +   (CASSANDRA-5722)
 + * Add ability for CQL3 to list partition keys (CASSANDRA-4536)
 + * Improve native protocol serialization (CASSANDRA-5664)
 + * Upgrade Thrift to 0.9.1 (CASSANDRA-5923)
 + * Require superuser status for adding triggers (CASSANDRA-5963)
 + * Make standalone scrubber handle old and new style leveled manifest
 +   (CASSANDRA-6005)
 + * Fix paxos bugs (CASSANDRA-6012, 6013, 6023)
 + * Fix paged ranges with multiple replicas (CASSANDRA-6004)
 + * Fix potential AssertionError during tracing (CASSANDRA-6041)
 + * Fix NPE in sstablesplit (CASSANDRA-6027)
 +Merged from 1.2:
- 1.2.10
+  * Tuning knobs for dealing with large blobs and many CFs (CASSANDRA-5982)
+  * (Hadoop) Fix CQLRW for thrift tables (CASSANDRA-6002)
   * Fix possible divide-by-zero in HHOM (CASSANDRA-5990)
   * Allow local batchlog writes for CL.ANY (CASSANDRA-5967)
   * Optimize name query performance in wide rows (CASSANDRA-5966)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b0b2fb/conf/cassandra.yaml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b0b2fb/src/java/org/apache/cassandra/config/Config.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b0b2fb/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b0b2fb/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b0b2fb/src/java/org/apache/cassandra/db/Memtable.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/Memtable.java
index 2b3ca1e,cbe20fe..4cca602
--- a/src/java/org/apache/cassandra/db/Memtable.java
+++ b/src/java/org/apache/cassandra/db/Memtable.java
@@@ -448,4 -462,63 +390,63 @@@ public class Memtabl
                                       sstableMetadataCollector);
          }
      }
+ 
+     private static class MeteringRunnable implements Runnable
+     {
+         // we might need to wait in the meter queue for a while.  measure whichever memtable
is active at that point,
+         // rather than keeping the original memtable referenced (and thus un-freeable) until
this runs.
+         private final ColumnFamilyStore cfs;
+ 
+         public MeteringRunnable(ColumnFamilyStore cfs)
+         {
+             this.cfs = cfs;
+         }
+ 
+         public void run()
+         {
+             try
+             {
+                 activelyMeasuring = cfs;
+                 Memtable memtable = cfs.getMemtableThreadSafe();
+ 
 -                long start = System.currentTimeMillis();
++                long start = System.nanoTime();
+                 // ConcurrentSkipListMap has cycles, so measureDeep will have to track a
reference to EACH object it visits.
+                 // So to reduce the memory overhead of doing a measurement, we break it
up to row-at-a-time.
 -                long deepSize = memtable.meter.measure(memtable.columnFamilies);
++                long deepSize = memtable.meter.measure(memtable.rows);
+                 int objects = 0;
 -                for (Map.Entry<RowPosition, ColumnFamily> entry : memtable.columnFamilies.entrySet())
++                for (Map.Entry<RowPosition, AtomicSortedColumns> entry : memtable.rows.entrySet())
+                 {
+                     deepSize += memtable.meter.measureDeep(entry.getKey()) + memtable.meter.measureDeep(entry.getValue());
+                     objects += entry.getValue().getColumnCount();
+                 }
+                 double newRatio = (double) deepSize / memtable.currentSize.get();
+ 
+                 if (newRatio < MIN_SANE_LIVE_RATIO)
+                 {
+                     logger.warn("setting live ratio to minimum of {} instead of {}", MIN_SANE_LIVE_RATIO,
newRatio);
+                     newRatio = MIN_SANE_LIVE_RATIO;
+                 }
+                 if (newRatio > MAX_SANE_LIVE_RATIO)
+                 {
+                     logger.warn("setting live ratio to maximum of {} instead of {}", MAX_SANE_LIVE_RATIO,
newRatio);
+                     newRatio = MAX_SANE_LIVE_RATIO;
+                 }
+ 
+                 // we want to be very conservative about our estimate, since the penalty
for guessing low is OOM
+                 // death.  thus, higher estimates are believed immediately; lower ones are
averaged w/ the old
+                 if (newRatio > cfs.liveRatio)
+                     cfs.liveRatio = newRatio;
+                 else
+                     cfs.liveRatio = (cfs.liveRatio + newRatio) / 2.0;
+ 
+                 logger.info("{} liveRatio is {} (just-counted was {}).  calculation took
{}ms for {} columns",
 -                            cfs, cfs.liveRatio, newRatio, System.currentTimeMillis() - start,
objects);
++                            cfs, cfs.liveRatio, newRatio, TimeUnit.NANOSECONDS.toMillis(System.nanoTime()
- start), objects);
+             }
+             finally
+             {
+                 activelyMeasuring = null;
+                 meteringInProgress.remove(cfs);
+             }
+         }
+     }
  }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b0b2fb/src/java/org/apache/cassandra/db/commitlog/PeriodicCommitLogExecutorService.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b0b2fb/src/java/org/apache/cassandra/utils/StatusLogger.java
----------------------------------------------------------------------


Mime
View raw message