cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/6] git commit: Compute more accurate compaction score per level patch by dbrosius; reviewed by jbellis for CASSANDRA-3790
Date Thu, 26 Jan 2012 07:33:40 GMT
Updated Branches:
  refs/heads/trunk d5979b301 -> 26083f71f


Compute more accurate compaction score per level
patch by dbrosius; reviewed by jbellis for CASSANDRA-3790


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

Branch: refs/heads/trunk
Commit: 26083f71f1fa39b74fbc6ffbad1a0abfb60fdd9b
Parents: a43c1eb
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Jan 26 01:31:38 2012 -0600
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Jan 26 01:33:26 2012 -0600

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../cassandra/db/compaction/LeveledManifest.java   |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/26083f71/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 082ca73..53a6c67 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -61,6 +61,7 @@
 
 
 1.0.8
+ * Compute more accurate compaction score per level (CASSANDRA-3790)
  * Return InvalidRequest when using a keyspace that doesn't exist
    (CASSANDRA-3764)
  * disallow user modification of System keyspace (CASSANDRA-3738)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/26083f71/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
index 6c3d8c3..f7bc3ec 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@ -242,7 +242,7 @@ public class LeveledManifest
             List<SSTableReader> sstables = generations[i];
             if (sstables.isEmpty())
                 continue; // mostly this just avoids polluting the debug log with zero scores
-            double score = SSTableReader.getTotalBytes(sstables) / maxBytesForLevel(i);
+            double score = (double)SSTableReader.getTotalBytes(sstables) / (double)maxBytesForLevel(i);
             logger.debug("Compaction score for level {} is {}", i, score);
 
             // L0 gets a special case that if we don't have anything more important to do,


Mime
View raw message