hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndimi...@apache.org
Subject svn commit: r1590997 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
Date Tue, 29 Apr 2014 14:51:27 GMT
Author: ndimiduk
Date: Tue Apr 29 14:51:26 2014
New Revision: 1590997

URL: http://svn.apache.org/r1590997
Log:
HBASE-11082 Potential unclosed TraceScope in FSHLog#replaceWriter()

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java?rev=1590997&r1=1590996&r2=1590997&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
Tue Apr 29 14:51:26 2014
@@ -922,13 +922,16 @@ class FSHLog implements HLog, Syncable {
       LOG.error("Failed close of HLog writer " + oldPath + ", unflushedEntries=" + count,
e);
       throw new FailedLogCloseException(oldPath + ", unflushedEntries=" + count, e);
     } finally {
-      // Let the writer thread go regardless, whether error or not.
-      if (zigzagLatch != null) {
-        zigzagLatch.releaseSafePoint();
-        // It will be null if we failed our wait on safe point above.
-        if (syncFuture != null) blockOnSync(syncFuture);
+      try {
+        // Let the writer thread go regardless, whether error or not.
+        if (zigzagLatch != null) {
+          zigzagLatch.releaseSafePoint();
+          // It will be null if we failed our wait on safe point above.
+          if (syncFuture != null) blockOnSync(syncFuture);
+        }
+      } finally {
+        scope.close();
       }
-      scope.close();
     }
     return newPath;
   }



Mime
View raw message