cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/6] git commit: include tombstone size in ColumnFamily.size patch by Andriy Kolyadenko; reviewed by jbellis for CASSANDRA-3741
Date Thu, 03 May 2012 15:42:52 GMT
include tombstone size in ColumnFamily.size
patch by Andriy Kolyadenko; reviewed by jbellis for CASSANDRA-3741


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

Branch: refs/heads/cassandra-1.1
Commit: dfdf89cbc93917052aac5b9e1ed7581a1d026fa3
Parents: f960f13
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu May 3 10:39:36 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu May 3 10:41:32 2012 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    2 ++
 src/java/org/apache/cassandra/db/ColumnFamily.java |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dfdf89cb/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 3f3ff72..b13d69b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 1.1.1-dev
+ * include tombstone size in ColumnFamily.size, which can prevent OOM
+   during sudden mass delete operations (CASSANDRA-3741)
  * Open 1 sstableScanner per level for leveled compaction (CASSANDRA-4142)
  * Optimize reads when row deletion timestamps allow us to restrict
    the set of sstables we check (CASSANDRA-4116)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/dfdf89cb/src/java/org/apache/cassandra/db/ColumnFamily.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamily.java b/src/java/org/apache/cassandra/db/ColumnFamily.java
index 298dfa5..aa683ea 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamily.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamily.java
@@ -260,7 +260,7 @@ public class ColumnFamily extends AbstractColumnContainer implements IRowCacheEn
 
     int size()
     {
-        int size = 0;
+        int size = DBConstants.longSize + DBConstants.intSize; // tombstone tracking
         for (IColumn column : columns)
         {
             size += column.size();


Mime
View raw message