phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamestay...@apache.org
Subject phoenix git commit: PHOENIX-2552 Fix hanging Jenkins builds
Date Thu, 31 Dec 2015 07:19:23 GMT
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.0 fd5fff29f -> 4c99fc2b1


PHOENIX-2552 Fix hanging Jenkins builds


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

Branch: refs/heads/4.x-HBase-1.0
Commit: 4c99fc2b1c13b54820cbe0544980b392f6fcdf4b
Parents: fd5fff2
Author: James Taylor <jtaylor@salesforce.com>
Authored: Wed Dec 30 21:04:12 2015 -0800
Committer: James Taylor <jtaylor@salesforce.com>
Committed: Wed Dec 30 23:17:56 2015 -0800

----------------------------------------------------------------------
 .../org/apache/phoenix/memory/GlobalMemoryManager.java | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c99fc2b/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
b/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
index 6460260..e70b35f 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/memory/GlobalMemoryManager.java
@@ -151,23 +151,24 @@ public class GlobalMemoryManager implements MemoryManager {
                 if (size > 0) {
                     logger.warn("Orphaned chunk of " + size + " bytes found during finalize");
                 }
-                close();
-                // TODO: log error here, but we can't use SFDC logging
-                // because this runs in an hbase coprocessor.
-                // Create a gack-like API (talk with GridForce or HBase folks)
+                freeMemory();
             } finally {
                 super.finalize();
             }
         }
 
-        @Override
-        public void close() {
+        private void freeMemory() {
             synchronized(sync) {
                 usedMemoryBytes -= size;
                 size = 0;
                 sync.notifyAll();
             }
         }
+        
+        @Override
+        public void close() {
+            freeMemory();
+        }
     }
 }
 


Mime
View raw message