Apache9 commented on a change in pull request #2437:
URL: https://github.com/apache/hbase/pull/2437#discussion_r495576703



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##########
@@ -6423,7 +6427,11 @@ protected void restoreEdit(HStore s, Cell cell, 
MemStoreSizing memstoreAccountin
    * @throws IOException
    */
   private static boolean isZeroLengthThenDelete(final FileSystem fs, final 
FileStatus stat,
-      final Path p) throws IOException {
+      final Path p, Configuration conf) throws IOException {
+    if (stat.getLen() > 0) {
+      return false;
+    }
+    RecoverLeaseFSUtils.recoverFileLease(fs, p, conf);

Review comment:
       But after this, you do not get the stat again?
   Anyway, my point here is that, make sure that when we call this method, we 
have already finished renaming the wal directory and calling recover lease on 
the wal files. Calling recoverLease and then re-get the FileStatus will 
generate extra load to NameNode.




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


Reply via email to