[1/2] git commit: Don't keep ancestor information in memory since it is only used on startup.
Updated Branches: refs/heads/trunk 1a2f35731 -> 07ca445e5 Don't keep ancestor information in memory since it is only used on startup. patch by marcuse, reviewed by jbellis for CASSANDRA-5342 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/83b75754 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/83b75754 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/83b75754 Branch: refs/heads/trunk Commit: 83b75754ff143d4d77b01ef76a813da47779c6f4 Parents: cc9ac82 Author: Marcus Eriksson Authored: Mon Jul 8 09:55:34 2013 +0200 Committer: Marcus Eriksson Committed: Mon Jul 8 09:57:11 2013 +0200 -- CHANGES.txt | 1 + .../cassandra/io/sstable/SSTableMetadata.java | 39 ++-- .../cassandra/io/sstable/SSTableReader.java | 12 +- .../cassandra/io/sstable/SSTableWriter.java | 6 +-- .../cassandra/tools/SSTableMetadataViewer.java | 2 +- .../sstable/SSTableMetadataSerializerTest.java | 13 +-- 6 files changed, 52 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b75754/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index fa4df36..b08f967 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ (CASSANDRA-5692) * Fix skipping range tombstones with reverse queries (CASSANDRA-5712) * Expire entries out of ThriftSessionManager (CASSANRDA-5719) + * Don't keep ancestor information in memory (CASSANDRA-5342) 1.2.6 * Fix tracing when operation completes before all responses arrive http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b75754/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java -- diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java b/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java index 865c2ea..de51ea9 100644 --- a/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java +++ b/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java @@ -20,6 +20,7 @@ package org.apache.cassandra.io.sstable; import java.io.*; import java.util.*; +import org.apache.cassandra.utils.Pair; import org.apache.cassandra.utils.StreamingHistogram; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,7 +56,6 @@ public class SSTableMetadata public final long maxTimestamp; public final double compressionRatio; public final String partitioner; -public final Set ancestors; public final StreamingHistogram estimatedTombstoneDropTime; private SSTableMetadata() @@ -67,7 +67,6 @@ public class SSTableMetadata Long.MAX_VALUE, NO_COMPRESSION_RATIO, null, - Collections.emptySet(), defaultTombstoneDropTimeHistogram()); } @@ -78,7 +77,6 @@ public class SSTableMetadata long maxTimestamp, double cr, String partitioner, -Set ancestors, StreamingHistogram estimatedTombstoneDropTime) { this.estimatedRowSize = rowSizes; @@ -88,7 +86,6 @@ public class SSTableMetadata this.maxTimestamp = maxTimestamp; this.compressionRatio = cr; this.partitioner = partitioner; -this.ancestors = ancestors; this.estimatedTombstoneDropTime = estimatedTombstoneDropTime; } @@ -193,7 +190,6 @@ public class SSTableMetadata maxTimestamp, compressionRatio, partitioner, - ancestors, estimatedTombstoneDropTime); } @@ -242,7 +238,7 @@ public class SSTableMetadata { private static final Logger logger = LoggerFactory.getLogger(SSTableMetadataSerializer.class); -public void serialize(SSTableMetadata sstableStats, DataOutput dos) throws IOException +public void serialize(SSTableMetadata sstableStats, Set ancestors, DataOutput dos) throws IOException { assert sstableStats.partitioner != null; @@ -253,20 +249,31 @@ public class SSTableMetadata dos.writeLong(sstableStats.maxTimestamp); dos.writeDouble(sstableStats.compressionRatio); dos.writeUTF(sstableStats.partitioner); -dos.writeInt(sstableStats.ancestors.size()); -for (Integer g : sstableStats.ancestors) +dos.writeInt(ancestors.size()); +for (Integer g : ancestors) dos.writeInt(g);
git commit: Don't keep ancestor information in memory since it is only used on startup.
Updated Branches: refs/heads/cassandra-1.2 cc9ac8277 -> 83b75754f Don't keep ancestor information in memory since it is only used on startup. patch by marcuse, reviewed by jbellis for CASSANDRA-5342 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/83b75754 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/83b75754 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/83b75754 Branch: refs/heads/cassandra-1.2 Commit: 83b75754ff143d4d77b01ef76a813da47779c6f4 Parents: cc9ac82 Author: Marcus Eriksson Authored: Mon Jul 8 09:55:34 2013 +0200 Committer: Marcus Eriksson Committed: Mon Jul 8 09:57:11 2013 +0200 -- CHANGES.txt | 1 + .../cassandra/io/sstable/SSTableMetadata.java | 39 ++-- .../cassandra/io/sstable/SSTableReader.java | 12 +- .../cassandra/io/sstable/SSTableWriter.java | 6 +-- .../cassandra/tools/SSTableMetadataViewer.java | 2 +- .../sstable/SSTableMetadataSerializerTest.java | 13 +-- 6 files changed, 52 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b75754/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index fa4df36..b08f967 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ (CASSANDRA-5692) * Fix skipping range tombstones with reverse queries (CASSANDRA-5712) * Expire entries out of ThriftSessionManager (CASSANRDA-5719) + * Don't keep ancestor information in memory (CASSANDRA-5342) 1.2.6 * Fix tracing when operation completes before all responses arrive http://git-wip-us.apache.org/repos/asf/cassandra/blob/83b75754/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java -- diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java b/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java index 865c2ea..de51ea9 100644 --- a/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java +++ b/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java @@ -20,6 +20,7 @@ package org.apache.cassandra.io.sstable; import java.io.*; import java.util.*; +import org.apache.cassandra.utils.Pair; import org.apache.cassandra.utils.StreamingHistogram; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,7 +56,6 @@ public class SSTableMetadata public final long maxTimestamp; public final double compressionRatio; public final String partitioner; -public final Set ancestors; public final StreamingHistogram estimatedTombstoneDropTime; private SSTableMetadata() @@ -67,7 +67,6 @@ public class SSTableMetadata Long.MAX_VALUE, NO_COMPRESSION_RATIO, null, - Collections.emptySet(), defaultTombstoneDropTimeHistogram()); } @@ -78,7 +77,6 @@ public class SSTableMetadata long maxTimestamp, double cr, String partitioner, -Set ancestors, StreamingHistogram estimatedTombstoneDropTime) { this.estimatedRowSize = rowSizes; @@ -88,7 +86,6 @@ public class SSTableMetadata this.maxTimestamp = maxTimestamp; this.compressionRatio = cr; this.partitioner = partitioner; -this.ancestors = ancestors; this.estimatedTombstoneDropTime = estimatedTombstoneDropTime; } @@ -193,7 +190,6 @@ public class SSTableMetadata maxTimestamp, compressionRatio, partitioner, - ancestors, estimatedTombstoneDropTime); } @@ -242,7 +238,7 @@ public class SSTableMetadata { private static final Logger logger = LoggerFactory.getLogger(SSTableMetadataSerializer.class); -public void serialize(SSTableMetadata sstableStats, DataOutput dos) throws IOException +public void serialize(SSTableMetadata sstableStats, Set ancestors, DataOutput dos) throws IOException { assert sstableStats.partitioner != null; @@ -253,20 +249,31 @@ public class SSTableMetadata dos.writeLong(sstableStats.maxTimestamp); dos.writeDouble(sstableStats.compressionRatio); dos.writeUTF(sstableStats.partitioner); -dos.writeInt(sstableStats.ancestors.size()); -for (Integer g : sstableStats.ancestors) +dos.writeInt(ancestors.size()); +for (Integer g : ancestors) dos.wr