Skip to content

HBASE-22617 Recovered WAL directories not getting cleaned up - #330

Merged
Apache9 merged 1 commit into
apache:masterfrom
Apache9:HBASE-22617
Jun 25, 2019
Merged

HBASE-22617 Recovered WAL directories not getting cleaned up#330
Apache9 merged 1 commit into
apache:masterfrom
Apache9:HBASE-22617

Conversation

@Apache9

Copy link
Copy Markdown
Contributor

No description provided.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
0reexec26Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
+1test4tests0The patch appears to include 4 new or modified test files.
_ master Compile Tests _
0mvndep24Maven dependency ordering for branch
+1mvninstall252master passed
+1compile96master passed
+1checkstyle114master passed
+1shadedjars271branch has no errors when building our shaded downstream artifacts.
+1findbugs271master passed
+1javadoc66master passed
_ Patch Compile Tests _
0mvndep15Maven dependency ordering for patch
+1mvninstall240the patch passed
+1compile93the patch passed
+1javac93the patch passed
-1checkstyle73hbase-server: The patch generated 3 new + 387 unchanged - 2 fixed = 390 total (was 389)
-1checkstyle14hbase-backup: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
+1whitespace0The patch has no whitespace issues.
+1shadedjars265patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck730Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1findbugs304the patch passed
+1javadoc68the patch passed
_ Other Tests _
+1unit171hbase-common in the patch passed.
-1unit8717hbase-server in the patch failed.
+1unit815hbase-backup in the patch passed.
+1asflicense90The patch does not generate ASF License warnings.
13097
ReasonTests
Failed junit testshadoop.hbase.replication.TestSerialSyncReplication
hadoop.hbase.regionserver.TestOpenSeqNumUnexpectedIncrease
hadoop.hbase.replication.regionserver.TestSyncReplicationShipperQuit
hadoop.hbase.TestSequenceIdMonotonicallyIncreasing
hadoop.hbase.client.TestHbck
hadoop.hbase.replication.TestSerialReplication
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/1/artifact/out/Dockerfile
GITHUB PR#330
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux bd0656cc4f09 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / 9aee88e
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/1/artifact/out/diff-checkstyle-hbase-server.txt
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/1/artifact/out/diff-checkstyle-hbase-backup.txt
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/1/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/1/testReport/
Max. process+thread count4817 (vs. ulimit of 10000)
modulesC: hbase-common hbase-server hbase-backup U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/1/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@Apache9

Copy link
Copy Markdown
ContributorAuthor

Fixed the failed UTs. In the new patch, will delete the wrong region wal directory after successfully opening a region. And also, in GCRegionProcedure we will delete the region wal directory, and in DeleteTableProcedure.deleteFromFs(which will be called from many places), we will delete the table wal directory.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
0reexec43Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
+1test4tests0The patch appears to include 4 new or modified test files.
_ master Compile Tests _
0mvndep28Maven dependency ordering for branch
+1mvninstall259master passed
+1compile99master passed
+1checkstyle120master passed
+1shadedjars281branch has no errors when building our shaded downstream artifacts.
+1findbugs292master passed
+1javadoc68master passed
_ Patch Compile Tests _
0mvndep14Maven dependency ordering for patch
+1mvninstall256the patch passed
+1compile99the patch passed
+1javac99the patch passed
+1checkstyle24The patch passed checkstyle in hbase-common
+1checkstyle80hbase-server: The patch generated 0 new + 388 unchanged - 32 fixed = 388 total (was 420)
+1checkstyle13The patch passed checkstyle in hbase-backup
+1whitespace0The patch has no whitespace issues.
+1shadedjars274patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck768Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1findbugs312the patch passed
+1javadoc66the patch passed
_ Other Tests _
+1unit156hbase-common in the patch passed.
-1unit12930hbase-server in the patch failed.
+1unit964hbase-backup in the patch passed.
+1asflicense76The patch does not generate ASF License warnings.
17589
ReasonTests
Failed junit testshadoop.hbase.replication.TestSerialReplication
hadoop.hbase.client.TestHbck
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/2/artifact/out/Dockerfile
GITHUB PR#330
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux cb8808c0c881 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 UTC 2018 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / 9aee88e
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/2/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/2/testReport/
Max. process+thread count4640 (vs. ulimit of 10000)
modulesC: hbase-common hbase-server hbase-backup U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/2/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@Apache9

Copy link
Copy Markdown
ContributorAuthor

Let me check the failed UTs.

@Apache9

Copy link
Copy Markdown
ContributorAuthor

TestHbck.testRecoverSplitAfterMetaUpdated is still failing. Will dig more.

*/
public Path getRegionDir(RegionInfo region) {
return FSUtils.getRegionDir(FSUtils.getTableDir(getRootDir(), region.getTable()), region);
return FSUtils.getRegionDirFromRootDir(getRootDir(), region);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this? The old impl should be getRegionDirFromTableDir?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are the same...

You can see the implementation of getRegionDirFromRootDir, it will first generate the tableDir...

// Cleanup the directories on WAL filesystem also
Path regionWALDir = FSUtils.getWALRegionDir(env.getMasterConfiguration(),
getRegion().getTable(), getRegion().getEncodedName());
walFs.delete(regionWALDir, true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regionWALDir should already be deleted when archive region dir?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They could be on different file system. The table data are on the normal file system and these are on the wal file system. By default they are the same but they could be different, i.e, when deploying HBase on S3.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. But for the wrong regionWALDir, how about exist first and then delete it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 check exists first


// Delete the directory on wal filesystem
FileSystem walFs = mfs.getWALFileSystem();
Path tableWALDir = FSUtils.getWALTableDir(env.getMasterConfiguration(), tableName);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should already be deleted when archive table?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They could be on different file system. The table data are on the normal file system and these are on the wal file system. By default they are the same but they could be different, i.e, when deploying HBase on S3.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

if (!createDir(splitdir)) {
throw new IOException("Failed create of " + splitdir);
}
Path daughterATmpDir = getSplitsDir(daughterA);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to create the directories for daughter regions here, as it is possible that we do not have any store files to split, which means the directories may not be created when we call commitDaugherRegion, and then we will miss the .regioninfo file and cause TestHbck to fail. Not sure why this does not have problem in the past but it is no harm...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
0reexec92Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
+1test4tests0The patch appears to include 4 new or modified test files.
_ master Compile Tests _
0mvndep25Maven dependency ordering for branch
+1mvninstall246master passed
+1compile97master passed
+1checkstyle113master passed
+1shadedjars268branch has no errors when building our shaded downstream artifacts.
+1findbugs272master passed
+1javadoc69master passed
_ Patch Compile Tests _
0mvndep15Maven dependency ordering for patch
+1mvninstall240the patch passed
+1compile97the patch passed
+1javac97the patch passed
+1checkstyle23The patch passed checkstyle in hbase-common
+1checkstyle74hbase-server: The patch generated 0 new + 388 unchanged - 32 fixed = 388 total (was 420)
+1checkstyle15The patch passed checkstyle in hbase-backup
+1whitespace0The patch has no whitespace issues.
+1shadedjars266patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck719Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1findbugs302the patch passed
+1javadoc71the patch passed
_ Other Tests _
+1unit169hbase-common in the patch passed.
-1unit8530hbase-server in the patch failed.
+1unit791hbase-backup in the patch passed.
+1asflicense73The patch does not generate ASF License warnings.
12927
ReasonTests
Failed junit testshadoop.hbase.client.TestHbck
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/3/artifact/out/Dockerfile
GITHUB PR#330
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 8b38e7979e70 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / 9aee88e
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/3/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/3/testReport/
Max. process+thread count4792 (vs. ulimit of 10000)
modulesC: hbase-common hbase-server hbase-backup U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/3/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

Comment threadhbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitUtil.java Outdated
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
0reexec135Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
+1test4tests0The patch appears to include 4 new or modified test files.
_ master Compile Tests _
0mvndep27Maven dependency ordering for branch
+1mvninstall247master passed
+1compile102master passed
+1checkstyle116master passed
+1shadedjars273branch has no errors when building our shaded downstream artifacts.
+1findbugs273master passed
+1javadoc68master passed
_ Patch Compile Tests _
0mvndep15Maven dependency ordering for patch
+1mvninstall253the patch passed
+1compile105the patch passed
+1javac105the patch passed
+1checkstyle24The patch passed checkstyle in hbase-common
+1checkstyle76hbase-server: The patch generated 0 new + 388 unchanged - 32 fixed = 388 total (was 420)
+1checkstyle15The patch passed checkstyle in hbase-backup
+1whitespace0The patch has no whitespace issues.
+1shadedjars263patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck728Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1findbugs306the patch passed
+1javadoc70the patch passed
_ Other Tests _
+1unit171hbase-common in the patch passed.
-1unit16025hbase-server in the patch failed.
+1unit1095hbase-backup in the patch passed.
+1asflicense85The patch does not generate ASF License warnings.
20816
ReasonTests
Failed junit testshadoop.hbase.client.TestSnapshotTemporaryDirectoryWithRegionReplicas
hadoop.hbase.client.TestFromClientSide
hadoop.hbase.client.TestFromClientSideWithCoprocessor
hadoop.hbase.master.TestMasterShutdown
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/4/artifact/out/Dockerfile
GITHUB PR#330
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 79ec73004e79 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / c1e5350
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/4/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/4/testReport/
Max. process+thread count4947 (vs. ulimit of 10000)
modulesC: hbase-common hbase-server hbase-backup U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/4/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
0reexec49Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
+1test4tests0The patch appears to include 4 new or modified test files.
_ master Compile Tests _
0mvndep12Maven dependency ordering for branch
+1mvninstall236master passed
+1compile96master passed
+1checkstyle111master passed
+1shadedjars263branch has no errors when building our shaded downstream artifacts.
+1findbugs276master passed
+1javadoc69master passed
_ Patch Compile Tests _
0mvndep16Maven dependency ordering for patch
+1mvninstall238the patch passed
+1compile96the patch passed
+1javac96the patch passed
+1checkstyle22The patch passed checkstyle in hbase-common
+1checkstyle73hbase-server: The patch generated 0 new + 388 unchanged - 32 fixed = 388 total (was 420)
+1checkstyle14The patch passed checkstyle in hbase-backup
+1whitespace1The patch has no whitespace issues.
+1shadedjars276patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck775Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1findbugs302the patch passed
+1javadoc66the patch passed
_ Other Tests _
+1unit166hbase-common in the patch passed.
-1unit16293hbase-server in the patch failed.
+1unit1023hbase-backup in the patch passed.
+1asflicense85The patch does not generate ASF License warnings.
20919
ReasonTests
Failed junit testshadoop.hbase.client.TestSnapshotTemporaryDirectoryWithRegionReplicas
hadoop.hbase.master.procedure.TestSCPWithReplicas
hadoop.hbase.replication.TestReplicationDisableInactivePeer
hadoop.hbase.util.TestFromClientSide3WoUnsafe
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/5/artifact/out/Dockerfile
GITHUB PR#330
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 58b3b66e8405 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / c1e5350
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/5/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/5/testReport/
Max. process+thread count5072 (vs. ulimit of 10000)
modulesC: hbase-common hbase-server hbase-backup U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/5/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@apurtellapurtell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm assuming all tests pass.
I may be back. Using this to make a branch-1 patch. Might find a small detail later.

// Cleanup the directories on WAL filesystem also
Path regionWALDir = FSUtils.getWALRegionDir(env.getMasterConfiguration(),
getRegion().getTable(), getRegion().getEncodedName());
walFs.delete(regionWALDir, true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 check exists first

}
}
for (Path file: files) {
for (Path file : filesUnderWrongRegionWALDir) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small code smell. Now that we have three lists, why not create one List, add to the one lists the files we find in any of the three locations we must check, then process the one list all at once. The only difference here is the log messages are slightly different but operators and us won't care if "root" or "wrong". The error or debug log lines all contain the file path, which is enough, I think.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are on different file systems so at least we need two loops...

return new Path(tabledir, name);
}

/**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good

@apurtell

Copy link
Copy Markdown
Contributor

After the fix is ready we should also have a unit test that confirms that no files are written outside of where we expect, so we can catch this kind of error in the future. Could be done as part of this work or as a follow up PR and JIRA, but we should have that additional test coverage in place going forward.

Path tableWALDir = FSUtils.getWALTableDir(env.getMasterConfiguration(), tableName);
if (walFs.exists(tableWALDir) && !walFs.delete(tableWALDir, true)) {
throw new IOException("Couldn't delete table dir on wal filesystem" + tableWALDir);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we not be checking for wrong wal directory here too and deleting that if it exists?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary I think, at least there is no way to delete the namespace directories... So the users hava to use a script to delete the empty directories manually...

// Cleanup the directories on WAL filesystem also
Path regionWALDir = FSUtils.getWALRegionDir(env.getMasterConfiguration(),
getRegion().getTable(), getRegion().getEncodedName());
walFs.delete(regionWALDir, true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please log at DEBUG if delete fails

walFs.delete(regionWALDir, true);
Path wrongRegionWALDir = FSUtils.getWrongWALRegionDir(env.getMasterConfiguration(),
getRegion().getTable(), getRegion().getEncodedName());
walFs.delete(wrongRegionWALDir, true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please log at DEBUG if delete fails

getRegionInfo().getEncodedName());
FileSystem walFs = getWalFileSystem();
if (walFs.exists(wrongRegionWALDir)) {
walFs.delete(wrongRegionWALDir, true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please log at DEBUG if delete fails

@Apache9

Copy link
Copy Markdown
ContributorAuthor

After the fix is ready we should also have a unit test that confirms that no files are written outside of where we expect, so we can catch this kind of error in the future. Could be done as part of this work or as a follow up PR and JIRA, but we should have that additional test coverage in place going forward.

Let's do this in a follow up, as the 'outside of where we expect' is not a clear description, we need to discuss how to implement the test, as well as how to check the result.

Let me address the review comments.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
0reexec26Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
+1test4tests0The patch appears to include 4 new or modified test files.
_ master Compile Tests _
0mvndep26Maven dependency ordering for branch
+1mvninstall250master passed
+1compile98master passed
+1checkstyle113master passed
+1shadedjars266branch has no errors when building our shaded downstream artifacts.
+1findbugs255master passed
+1javadoc68master passed
_ Patch Compile Tests _
0mvndep15Maven dependency ordering for patch
+1mvninstall243the patch passed
+1compile98the patch passed
+1javac98the patch passed
+1checkstyle23The patch passed checkstyle in hbase-common
+1checkstyle74hbase-server: The patch generated 0 new + 388 unchanged - 32 fixed = 388 total (was 420)
+1checkstyle14The patch passed checkstyle in hbase-backup
+1whitespace0The patch has no whitespace issues.
+1shadedjars271patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck737Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1findbugs305the patch passed
+1javadoc65the patch passed
_ Other Tests _
+1unit168hbase-common in the patch passed.
-1unit9192hbase-server in the patch failed.
+1unit864hbase-backup in the patch passed.
+1asflicense89The patch does not generate ASF License warnings.
13598
ReasonTests
Failed junit testshadoop.hbase.io.asyncfs.TestSaslFanOutOneBlockAsyncDFSOutput
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/6/artifact/out/Dockerfile
GITHUB PR#330
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux a81530de7cc1 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / 841b319
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/6/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/6/testReport/
Max. process+thread count4650 (vs. ulimit of 10000)
modulesC: hbase-common hbase-server hbase-backup U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-330/6/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@Apache9
Apache9 merged commit b426142 into apache:masterJun 25, 2019
asfgit pushed a commit that referenced this pull request Jun 25, 2019
Signed-off-by: Guanghao Zhang <zghao@apache.org>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
asfgit pushed a commit that referenced this pull request Jun 25, 2019
Signed-off-by: Guanghao Zhang <zghao@apache.org>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
asfgit pushed a commit that referenced this pull request Jun 25, 2019
Signed-off-by: Guanghao Zhang <zghao@apache.org>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
asfgit pushed a commit that referenced this pull request Jun 25, 2019
Signed-off-by: Guanghao Zhang <zghao@apache.org>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
wchevreuil pushed a commit to wchevreuil/hbase that referenced this pull request Jul 3, 2019
)
Signed-off-by: Guanghao Zhang <zghao@apache.org>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
for (Path file: files) {
if (!walFS.delete(file, false)) {
LOG.error("Failed delete of " + file);
for (Path file : filesUnderRootDir) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, if the region is read-only mode for HbaseTableSnapshotInputFormat, it try to delete the filesUnderRootDir and no access, it will throw exception and failed

infraio pushed a commit to infraio/hbase that referenced this pull request Aug 17, 2020
)
Signed-off-by: Guanghao Zhang <zghao@apache.org>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
symat pushed a commit to symat/hbase that referenced this pull request Feb 17, 2021
)
Signed-off-by: Guanghao Zhang <zghao@apache.org>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 2b7a7da)
Change-Id: I01752de3d258ac5e68fe0cd735bafadedb7547c3
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Apache9@Apache-HBase@apurtell@infraio@abhishek-chouhan@reborn-go