cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bened...@apache.org
Subject [1/3] cassandra git commit: ninja log deallocate in Ref.ensureReleased()
Date Tue, 24 Feb 2015 14:10:46 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 0a7f50876 -> 766d8c010
  refs/heads/trunk b944f0d66 -> ec2c050ba


ninja log deallocate in Ref.ensureReleased()


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

Branch: refs/heads/cassandra-2.1
Commit: 766d8c01033bfe0f1f9713e129fe07d157874fec
Parents: 0a7f508
Author: Benedict Elliott Smith <benedict@apache.org>
Authored: Tue Feb 24 14:10:25 2015 +0000
Committer: Benedict Elliott Smith <benedict@apache.org>
Committed: Tue Feb 24 14:10:25 2015 +0000

----------------------------------------------------------------------
 src/java/org/apache/cassandra/utils/concurrent/Ref.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/766d8c01/src/java/org/apache/cassandra/utils/concurrent/Ref.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/concurrent/Ref.java b/src/java/org/apache/cassandra/utils/concurrent/Ref.java
index dd04051..8213c46 100644
--- a/src/java/org/apache/cassandra/utils/concurrent/Ref.java
+++ b/src/java/org/apache/cassandra/utils/concurrent/Ref.java
@@ -153,7 +153,11 @@ public final class Ref<T> implements RefCounted<T>, AutoCloseable
         void ensureReleased()
         {
             if (releasedUpdater.getAndSet(this, 1) == 0)
+            {
                 globalState.release(this);
+                if (DEBUG_ENABLED)
+                    debug.deallocate();
+            }
         }
 
         void release(boolean leak)


Mime
View raw message