You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/11/14 13:44:03 UTC

[GitHub] [hbase] guangxuCheng commented on a change in pull request #820: HBASE-23286 Improve MTTR: Split WAL to HFile

guangxuCheng commented on a change in pull request #820: HBASE-23286 Improve MTTR: Split WAL to HFile
URL: https://github.com/apache/hbase/pull/820#discussion_r346316896
 
 

 ##########
 File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 ##########
 @@ -5354,6 +5356,32 @@ private void replayFlushInStores(FlushDescriptor flush, PrepareFlushResult prepa
     }
   }
 
+  private long loadRecoveredHFilesIfAny(Collection<HStore> stores) throws IOException {
+    Path regionDir = getWALRegionDir();
+    long maxSeqId = -1;
+    for (HStore store : stores) {
+      String familyName = store.getColumnFamilyName();
+      FileStatus[] files =
+          WALSplitUtil.getRecoveredHFiles(fs.getFileSystem(), regionDir, familyName);
+      if (files != null && files.length != 0) {
+        for (FileStatus file : files) {
+          store.assertBulkLoadHFileOk(file.getPath());
 
 Review comment:
   If the file is a corrupt HFile, an exception will be thrown here, which will cause the region to fail to open. 
   Maybe we can add a new parameter to control whether to skip the exception, similar to recover edits which has a parameter "hbase.hregion.edits.replay.skip.errors";

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services