saintstack 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_r361721355
 
 

 ##########
 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:
   Regions that can't be opened because of detached References or corrupt 
hfiles are a fact-of-life. We need work on this issue. This will be a new 
variant on the problem -- i.e. bad recovered hfiles. 
   
   On adding a config to ignore bad files and just open, thats a bit dangerous 
as per @infraio .... as it could mean silent data loss.

----------------------------------------------------------------
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