cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [3/10] git commit: remove [Freeable]Memory finalizers patch by Marcus Eriksson; reviewed by jbellis for CASSANDRA-4222
Date Fri, 04 May 2012 23:10:28 GMT
remove [Freeable]Memory finalizers
patch by Marcus Eriksson; reviewed by jbellis for CASSANDRA-4222


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

Branch: refs/heads/cassandra-1.1
Commit: 4e2e547d2e4cee403a4ff68a86f52a7cf898f6ef
Parents: 885ab7c
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri May 4 18:09:47 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri May 4 18:09:47 2012 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../org/apache/cassandra/cache/FreeableMemory.java |    8 --------
 src/java/org/apache/cassandra/io/util/Memory.java  |   14 --------------
 3 files changed, 1 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4e2e547d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6df2585..0c8e022 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.1-dev
+ * remove [Freeable]Memory finalizers (CASSANDRA-4222)
  * 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)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4e2e547d/src/java/org/apache/cassandra/cache/FreeableMemory.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cache/FreeableMemory.java b/src/java/org/apache/cassandra/cache/FreeableMemory.java
index 0df1a6a..af157ce 100644
--- a/src/java/org/apache/cassandra/cache/FreeableMemory.java
+++ b/src/java/org/apache/cassandra/cache/FreeableMemory.java
@@ -57,14 +57,6 @@ public class FreeableMemory extends Memory
     }
 
     @Override
-    protected void finalize() throws Throwable
-    {
-        assert references.get() <= 0;
-        assert peer == 0;
-        super.finalize();
-    }
-
-    @Override
     public byte getByte(long offset)
     {
         assert peer != 0;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4e2e547d/src/java/org/apache/cassandra/io/util/Memory.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/util/Memory.java b/src/java/org/apache/cassandra/io/util/Memory.java
index 2fb21a9..4757e9f 100644
--- a/src/java/org/apache/cassandra/io/util/Memory.java
+++ b/src/java/org/apache/cassandra/io/util/Memory.java
@@ -137,20 +137,6 @@ public class Memory
         peer = 0;
     }
 
-    @Override
-    protected void finalize() throws Throwable
-    {
-        try
-        {
-            if (peer != 0)
-                free();
-        }
-        finally
-        {
-            super.finalize();
-        }
-    }
-
     public long size()
     {
         return size;


Mime
View raw message