hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nspiegelb...@apache.org
Subject svn commit: r1181584 - /hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
Date Tue, 11 Oct 2011 02:22:45 GMT
Author: nspiegelberg
Date: Tue Oct 11 02:22:45 2011
New Revision: 1181584

URL: http://svn.apache.org/viewvc?rev=1181584&view=rev
Log:
Fix bug in HLog splitting.

Summary:
The HLog split logic incorrectly used to archive old logs before all
the new log files were written out and closed successfully. This has
been fixed in this diff.

Test Plan:
1) Run TestHLogSplit
2) Run TestHLogMethods
3) Run TestHLog
4) Kill regionservers during an HBase load test and verify log splitting
worked correctly.

Reviewed By: kannan
Reviewers: kannan
Commenters: dhruba, pkhemani
CC: hbase@lists, , pritam, kannan, dhruba, pkhemani
Revert Plan:
Tags:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

Differential Revision: 275654
Task ID: 617230

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

Modified: hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java?rev=1181584&r1=1181583&r2=1181584&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java (original)
+++ hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java Tue
Oct 11 02:22:45 2011
@@ -1411,7 +1411,6 @@ public class HLog implements Syncable {
         throw new IOException("Discovered orphan hlog after split. Maybe " +
           "HRegionServer was not dead when we started");
       }
-      archiveLogs(corruptedLogs, processedLogs, oldLogDir, fs, conf);
     } finally {
       splits = new ArrayList<Path>(logWriters.size());
       for (WriterAndPath wap : logWriters.values()) {
@@ -1420,6 +1419,7 @@ public class HLog implements Syncable {
         LOG.debug("Closed " + wap.p);
       }
     }
+    archiveLogs(corruptedLogs, processedLogs, oldLogDir, fs, conf);
     return splits;
   }
 



Mime
View raw message