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 2020/10/01 16:14:38 UTC
[GitHub] [hbase] saintstack commented on a change in pull request #2437: HBASE-25053 WAL replay should ignore 0-length files
saintstack commented on a change in pull request #2437:
URL: https://github.com/apache/hbase/pull/2437#discussion_r498364347
##########
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:
I see now (was resolved so I missed it).
Then the patch looks good. A nit is that we could do w/ a comment here that says it is safe to trust the zero-length in this case because we've been through rename and lease recovery in the above. Thanks.
----------------------------------------------------------------
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