You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by yu...@apache.org on 2012/07/03 19:44:25 UTC

git commit: use proper partitioner for Range; patch by yukim, reviewed by jbellis for CASSANDRA-4404

Updated Branches:
  refs/heads/trunk 45b057bcf -> d2b60f289


use proper partitioner for Range; patch by yukim, reviewed by jbellis for CASSANDRA-4404


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

Branch: refs/heads/trunk
Commit: d2b60f28935466f6e37fc9d64a44c5c81bc14fb4
Parents: 45b057b
Author: Yuki Morishita <yu...@apache.org>
Authored: Tue Jul 3 12:44:14 2012 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Tue Jul 3 12:44:14 2012 -0500

----------------------------------------------------------------------
 .../compaction/SizeTieredCompactionStrategy.java   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2b60f28/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java b/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
index 9c07a93..67d2e77 100644
--- a/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
@@ -107,7 +107,7 @@ public class SizeTieredCompactionStrategy extends AbstractCompactionStrategy
                         long keys = table.estimatedKeys();
                         Set<Range<Token>> ranges = new HashSet<Range<Token>>();
                         for (SSTableReader overlap : overlaps)
-                            ranges.add(new Range<Token>(overlap.first.token, overlap.last.token));
+                            ranges.add(new Range<Token>(overlap.first.token, overlap.last.token, overlap.partitioner));
                         long remainingKeys = keys - table.estimatedKeysForRanges(ranges);
                         // next, calculate what percentage of columns we have within those keys
                         double remainingKeysRatio = ((double) remainingKeys) / keys;