cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/2] git commit: Compute more accurate compaction score per level patch by dbrosius; reviewed by jbellis for CASSANDRA-3790
Date Thu, 26 Jan 2012 07:32:46 GMT
Updated Branches:
  refs/heads/cassandra-1.0 5c66bd9d3 -> b66321057


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/b6632105
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b6632105
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b6632105

Branch: refs/heads/cassandra-1.0
Commit: b663210576a2ca9534d17d2c757e87a8726a8d0c
Parents: 1a01027
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:31:38 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/b6632105/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index cbe8498..2c7db76 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 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/b6632105/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 40a0a17..189de8e 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@ -241,7 +241,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