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:
[email protected]


With regards,
Apache Git Services

Reply via email to