Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 917fabe23 -> 35a4f7dd6
Avoid overflow when calculating max sstable size in LCS Patch by marcuse; reviewed by carlyeks for CASSANDRA-9235 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/35a4f7dd Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/35a4f7dd Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/35a4f7dd Branch: refs/heads/cassandra-2.0 Commit: 35a4f7dd68019fd860b1a741674cae5bd3c6c08d Parents: 917fabe Author: Marcus Eriksson <[email protected]> Authored: Fri Apr 24 16:42:31 2015 +0200 Committer: Marcus Eriksson <[email protected]> Committed: Mon Apr 27 09:14:53 2015 +0200 ---------------------------------------------------------------------- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/compaction/LeveledManifest.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/35a4f7dd/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 5f6a547..2613901 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.15: + * Avoid overflow when calculating max sstable size in LCS (CASSANDRA-9235) * Make sstable blacklisting work with compression (CASSANDRA-9138) * Do not attempt to rebuild indexes if no index accepts any column (CASSANDRA-9196) * Don't initiate snitch reconnection for dead states (CASSANDRA-7292) http://git-wip-us.apache.org/repos/asf/cassandra/blob/35a4f7dd/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 6554eb2..867b5ce 100644 --- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java +++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java @@ -68,14 +68,14 @@ public class LeveledManifest private final ColumnFamilyStore cfs; private final List<SSTableReader>[] generations; private final RowPosition[] lastCompactedKeys; - private final int maxSSTableSizeInBytes; + private final long maxSSTableSizeInBytes; private final SizeTieredCompactionStrategyOptions options; private final int [] compactionCounter; private LeveledManifest(ColumnFamilyStore cfs, int maxSSTableSizeInMB, SizeTieredCompactionStrategyOptions options) { this.cfs = cfs; - this.maxSSTableSizeInBytes = maxSSTableSizeInMB * 1024 * 1024; + this.maxSSTableSizeInBytes = maxSSTableSizeInMB * 1024L * 1024L; this.options = options; // allocate enough generations for a PB of data, with a 1-MB sstable size. (Note that if maxSSTableSize is
