Skip to content

HBASE-23680 RegionProcedureStore missing cleaning of hfile archive - #1022

Merged
Apache9 merged 1 commit into
apache:masterfrom
Apache9:HBASE-23680
Jan 18, 2020
Merged

HBASE-23680 RegionProcedureStore missing cleaning of hfile archive#1022
Apache9 merged 1 commit into
apache:masterfrom
Apache9:HBASE-23680

Conversation

@Apache9

@Apache9 Apache9 commented Jan 11, 2020

Copy link
Copy Markdown
Contributor

No description provided.

@Apache9 Apache9 self-assigned this Jan 11, 2020
@Apache9
Apache9 requested a review from saintstack January 11, 2020 07:15
@Apache9 Apache9 added the bug label Jan 11, 2020
@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

private void compact() {
try {
region.compact(true);
deleteCompactedHFiles();

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.

We just delete archived files? Why even archive them then? Can we delay the delete at least?

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 we writing hfiles into WAL fs out of interest?

@Apache9

Apache9 commented Jan 12, 2020

Copy link
Copy Markdown
Contributor Author

Add a TTL config for deleting the archived HFiles.

On why we put all things on the WAL filesystem, partly because that I want to put all the data under a single directory, which can hide the internal implementation details about procedure store, and easy to replace the old implementation with another implementation.

And another thing is about performance. The WAL filesystem is HDFS, and the HFile storage, if not the same one, is usually S3 or some other object storages, which are very slow, usually. And usually the size of the procedure store will be small, I think the cost is also fine.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 4s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚 mvninstall 5m 56s master passed
+1 💚 compile 0m 59s master passed
+1 💚 checkstyle 1m 31s master passed
+1 💚 shadedjars 5m 1s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 38s master passed
+0 🆗 spotbugs 4m 49s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 4m 47s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 5m 37s the patch passed
+1 💚 compile 0m 57s the patch passed
+1 💚 javac 0m 57s the patch passed
+1 💚 checkstyle 1m 28s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 4m 59s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 17m 6s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚 javadoc 0m 35s the patch passed
+1 💚 findbugs 5m 2s the patch passed
_ Other Tests _
+1 💚 unit 154m 48s hbase-server in the patch passed.
+1 💚 asflicense 0m 26s The patch does not generate ASF License warnings.
217m 44s
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/4/artifact/out/Dockerfile
GITHUB PR #1022
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux d13a4b4c0e5b 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1022/out/precommit/personality/provided.sh
git revision master / 4ad12e0
Default Java 1.8.0_181
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/4/testReport/
Max. process+thread count 4915 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/4/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache9

Apache9 commented Jan 14, 2020

Copy link
Copy Markdown
Contributor Author

Ping @saintstack

@busbey

busbey commented Jan 14, 2020

Copy link
Copy Markdown
Contributor

On why we put all things on the WAL filesystem, partly because that I want to put all the data under a single directory, which can hide the internal implementation details about procedure store, and easy to replace the old implementation with another implementation.

And another thing is about performance. The WAL filesystem is HDFS, and the HFile storage, if not the same one, is usually S3 or some other object storages, which are very slow, usually. And usually the size of the procedure store will be small, I think the cost is also fine.

I like that this goes on the WAL filesystem and I think the justification is good. I went to check the docs to make sure the reasoning is spelled out as well there. Looks like the ref guide does not have details about the new procedure store and still has a bunch of stuff about the old one. Is there a JIRA I can watch to review when those docs are up?

@Apache9

Apache9 commented Jan 15, 2020

Copy link
Copy Markdown
Contributor Author

On why we put all things on the WAL filesystem, partly because that I want to put all the data under a single directory, which can hide the internal implementation details about procedure store, and easy to replace the old implementation with another implementation.
And another thing is about performance. The WAL filesystem is HDFS, and the HFile storage, if not the same one, is usually S3 or some other object storages, which are very slow, usually. And usually the size of the procedure store will be small, I think the cost is also fine.

I like that this goes on the WAL filesystem and I think the justification is good. I went to check the docs to make sure the reasoning is spelled out as well there. Looks like the ref guide does not have details about the new procedure store and still has a bunch of stuff about the old one. Is there a JIRA I can watch to review when those docs are up?

I checked the ref guide but did not seen anything about the procedure store? It is just about the procedure v2 framework, and these thing are not changed...

@busbey

busbey commented Jan 15, 2020

Copy link
Copy Markdown
Contributor

I checked the ref guide but did not seen anything about the procedure store? It is just about the procedure v2 framework, and these thing are not changed...

http://hbase.apache.org/book.html#master.wal

@saintstack

Copy link
Copy Markdown
Contributor

Filed HBASE-23697 for doc on RegionProcedureStore.

@Apache9

Apache9 commented Jan 16, 2020

Copy link
Copy Markdown
Contributor Author

I checked the ref guide but did not seen anything about the procedure store? It is just about the procedure v2 framework, and these thing are not changed...

http://hbase.apache.org/book.html#master.wal

Oh, it is not under the section of proc-v2? ...

@busbey

busbey commented Jan 16, 2020

Copy link
Copy Markdown
Contributor

Correct; the docs are a mess.

@Apache9

Apache9 commented Jan 16, 2020

Copy link
Copy Markdown
Contributor Author

Added a hbase.procedure.store.region.hfilecleaner.plugins, and add the default config to hbase-default.xml. The default value is org.apache.hadoop.hbase.master.cleaner.TimeToLiveHFileCleaner.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 7s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 7 new or modified test files.
_ master Compile Tests _
+0 🆗 mvndep 0m 32s Maven dependency ordering for branch
+1 💚 mvninstall 5m 44s master passed
+1 💚 compile 1m 39s master passed
+1 💚 checkstyle 2m 9s master passed
+0 🆗 refguide 6m 26s branch has no errors when building the reference guide. See footer for rendered docs, which you should manually inspect.
+1 💚 shadedjars 5m 0s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 11s master passed
+0 🆗 spotbugs 5m 2s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 6m 22s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 5m 28s the patch passed
+1 💚 compile 1m 38s the patch passed
+1 💚 javac 1m 38s the patch passed
-1 ❌ checkstyle 1m 30s hbase-server: The patch generated 3 new + 103 unchanged - 0 fixed = 106 total (was 103)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 2s The patch has no ill-formed XML file.
+0 🆗 refguide 6m 17s patch has no errors when building the reference guide. See footer for rendered docs, which you should manually inspect.
+1 💚 shadedjars 5m 4s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 17m 14s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚 javadoc 1m 10s the patch passed
+1 💚 findbugs 6m 40s the patch passed
_ Other Tests _
+1 💚 unit 3m 6s hbase-common in the patch passed.
+1 💚 unit 3m 36s hbase-procedure in the patch passed.
+1 💚 unit 155m 54s hbase-server in the patch passed.
+1 💚 asflicense 1m 16s The patch does not generate ASF License warnings.
247m 17s
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/5/artifact/out/Dockerfile
GITHUB PR #1022
Optional Tests dupname asflicense javac javadoc unit refguide xml spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux b929b09c26eb 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1022/out/precommit/personality/provided.sh
git revision master / 19d3bed
Default Java 1.8.0_181
refguide https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/5/artifact/out/branch-site/book.html
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/5/artifact/out/diff-checkstyle-hbase-server.txt
refguide https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/5/artifact/out/patch-site/book.html
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/5/testReport/
Max. process+thread count 5002 (vs. ulimit of 10000)
modules C: hbase-common hbase-procedure hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/5/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 2s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 7 new or modified test files.
_ master Compile Tests _
+0 🆗 mvndep 0m 33s Maven dependency ordering for branch
+1 💚 mvninstall 5m 41s master passed
+1 💚 compile 1m 37s master passed
+1 💚 checkstyle 2m 9s master passed
+0 🆗 refguide 6m 26s branch has no errors when building the reference guide. See footer for rendered docs, which you should manually inspect.
+1 💚 shadedjars 4m 59s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 12s master passed
+0 🆗 spotbugs 4m 49s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 6m 9s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 5m 28s the patch passed
+1 💚 compile 1m 38s the patch passed
+1 💚 javac 1m 38s the patch passed
+1 💚 checkstyle 2m 7s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+0 🆗 refguide 6m 19s patch has no errors when building the reference guide. See footer for rendered docs, which you should manually inspect.
+1 💚 shadedjars 5m 2s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 17m 8s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚 javadoc 1m 11s the patch passed
+1 💚 findbugs 6m 34s the patch passed
_ Other Tests _
+1 💚 unit 3m 8s hbase-common in the patch passed.
+1 💚 unit 3m 35s hbase-procedure in the patch passed.
+1 💚 unit 155m 19s hbase-server in the patch passed.
+1 💚 asflicense 1m 9s The patch does not generate ASF License warnings.
246m 4s
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/6/artifact/out/Dockerfile
GITHUB PR #1022
Optional Tests dupname asflicense javac javadoc unit refguide xml spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 608fe92c9c22 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1022/out/precommit/personality/provided.sh
git revision master / edc5368
Default Java 1.8.0_181
refguide https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/6/artifact/out/branch-site/book.html
refguide https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/6/artifact/out/patch-site/book.html
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/6/testReport/
Max. process+thread count 4602 (vs. ulimit of 10000)
modules C: hbase-common hbase-procedure hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1022/6/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache9

Apache9 commented Jan 17, 2020

Copy link
Copy Markdown
Contributor Author

Ping @busbey @saintstack

@saintstack saintstack 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.

One nit.

procedureStore =
new RegionProcedureStore(this, new MasterProcedureEnv.FsUtilsLeaseRecovery(this));
// Create cleaner thread pool
cleanerPool = new DirScanPool(conf);

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.

Strange place to start cleanerPool down here in the procedure startup given it is used cleaning WALs and hfile...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

But we have no choice as we need to use it in the next line...

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.

I was thinking you'd call it up in the caller's method, in startServiceThreads, rather than down hidden in here in startProcedureExecutor... i.e. move the line up thee lines from where it was.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The startServiceThreads method is called after createProcedureExecutor, notice that, it is create, not start...

@Apache9
Apache9 merged commit 167892c into apache:master Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants