hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbau...@apache.org
Subject svn commit: r1350849 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
Date Sat, 16 Jun 2012 03:12:38 GMT
Author: mbautin
Date: Sat Jun 16 03:12:37 2012
New Revision: 1350849

URL: http://svn.apache.org/viewvc?rev=1350849&view=rev
Log:
[HBASE-6002] resource leak in hlogsplitter

Author: pkhemani

Summary:
ignore writer.close exceptions

reader was not closed

Test Plan: none. running unit tests

Reviewers: kannan, aaiyer, liyintang, kranganathan

Reviewed By: kannan

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D496064

Modified:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java?rev=1350849&r1=1350848&r2=1350849&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
Sat Jun 16 03:12:37 2012
@@ -272,9 +272,18 @@ public class HLogSplitter {
         }
         n++;
         WriterAndPath wap = (WriterAndPath)o;
-        wap.w.close();
+        try {
+          wap.w.close();
+        } catch (IOException ioe) {
+          LOG.warn("Failed to close recovered edits writer " + wap.p, ioe);
+        }
         LOG.debug("Closed " + wap.p);
       }
+      try {
+        in.close();
+      } catch (IOException ioe) {
+        LOG.warn("Failed to close log reader " + logfile.getPath(), ioe);
+      }
       String msg = "processed " + editsCount + " edits across " + n +
           " regions" + " threw away edits for " + (logWriters.size() - n) +
           " regions" + " log file = " + logPath + " is corrupted = " +



Mime
View raw message