hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nspiegelb...@apache.org
Subject svn commit: r1181379 - /hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Date Tue, 11 Oct 2011 02:03:44 GMT
Author: nspiegelberg
Date: Tue Oct 11 02:03:43 2011
New Revision: 1181379

URL: http://svn.apache.org/viewvc?rev=1181379&view=rev
Log:
import HBASE-3015: fix cleanup of files in recovered.edits

Summary:
Summary:

See: https://issues.apache.org/jira/browse/HBASE-3015

Test Plan:
Ran unit tests.

DiffCamp Revision: 159874
Reviewed By: nspiegelberg
Commenters: pkhemani
CC: nspiegelberg, pkhemani, hbase@lists
Revert Plan:
OK

Modified:
    hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1181379&r1=1181378&r2=1181379&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Tue
Oct 11 02:03:43 2011
@@ -1927,12 +1927,13 @@ public class HRegion implements HeapSize
     if (seqid > minSeqId) {
       // Then we added some edits to memory. Flush and cleanup split edit files.
       internalFlushcache(null, seqid);
-      for (Path file: files) {
-        if (!this.fs.delete(file, false)) {
-          LOG.error("Failed delete of " + file);
-        } else {
-          LOG.debug("Deleted recovered.edits file=" + file);
-        }
+    }
+    // Now delete the content of recovered edits.  We're done w/ them.
+    for (Path file: files) {
+      if (!this.fs.delete(file, false)) {
+        LOG.error("Failed delete of " + file);
+      } else {
+        LOG.debug("Deleted recovered.edits file=" + file);
       }
     }
     return seqid;



Mime
View raw message