Skip to content

HBASE-25854 Remove redundant AM in-memory state changes in CatalogJanitor - #3234

Merged
apurtell merged 2 commits into
apache:masterfrom
apurtell:HBASE-25854
May 6, 2021
Merged

HBASE-25854 Remove redundant AM in-memory state changes in CatalogJanitor#3234
apurtell merged 2 commits into
apache:masterfrom
apurtell:HBASE-25854

Conversation

@apurtell

@apurtellapurtell commented May 5, 2021

Copy link
Copy Markdown
Contributor

In CatalogJanitor we schedule GCRegionProcedure to clean up both filesystem and in-memory state after a split, and GCMultipleMergedRegionsProcedure to do the same for merges. Both of these procedures clean up in-memory state, but CatalogJanitor also does this redundantly just after scheduling the procedures. The cleanup should be done in only one place. Presumably we are using the procedures to do it in a principled way. This is least a nit, but probably a source of future bugs. Remove the redundancy in CatalogJanitor and fix any follow on issues, like test failures.

@apurtell

Copy link
Copy Markdown
ContributorAuthor

This change is moved here from #3230.

We know from the test report there that TestCatalogJanitorInMemoryStates will fail. Let's let it fail here too and then proceed.

java.lang.AssertionError: Parent region should have been removed from RegionStates
at org.apache.hadoop.hbase.master.janitor.TestCatalogJanitorInMemoryStates.testInMemoryParentCleanup(TestCatalogJanitorInMemoryStates.java:123)

@apurtell

Copy link
Copy Markdown
ContributorAuthor

@Apache9 added some context on #3230

Some background

https://issues.apache.org/jira/browse/HBASE-24942

I've found a bug when refactoring CatalogJanitor because of we may clean the merge qualifiers in MergeTableRegionsProcedure. Theoretically we should only do this in GCRegion related procedures(as what you proposed here), but doing this in other places could speed up later process which could be blocked by merge qualifiers.

For me I'm +1 on removing the redundant removal in CatalogJanitor, but let's wait for @saintstack 's opinon too?

Thanks.

@apurtell

apurtell commented May 5, 2021

Copy link
Copy Markdown
ContributorAuthor

Although the unit test will fail, when I tried this change out on a cluster in a very write heavy ingestion test, the end result was good. The ingestion test completes successfully and without weird artifacts in the logging. All split regions are GCed by procedures. In memory state aligns with filesystem state.

/hbase/logs/hbase-apurtell-master-ip-172-31-58-47.us-west-2.compute.internal.log:130972:2021-05-05 15:47:39,190 INFO [master/ip-172-31-58-47:8100.Chore.1] master.HbckChore: Loaded 230 regions (0 disabled, 0 split parents) from in-memory state
/hbase/logs/hbase-apurtell-master-ip-172-31-58-47.us-west-2.compute.internal.log:130973:2021-05-05 15:47:39,190 DEBUG [master/ip-172-31-58-47:8100.Chore.1] master.HbckChore: Regions by state: OPEN=230
/hbase/logs/hbase-apurtell-master-ip-172-31-58-47.us-west-2.compute.internal.log:130974:2021-05-05 15:47:39,190 INFO [master/ip-172-31-58-47:8100.Chore.1] master.HbckChore: Loaded 230 regions from 5 regionservers' reports and found 0 orphan regions
/hbase/logs/hbase-apurtell-master-ip-172-31-58-47.us-west-2.compute.internal.log:130986:2021-05-05 15:47:39,200 INFO [master/ip-172-31-58-47:8100.Chore.1] master.HbckChore: Loaded 3 tables 230 regions from filesyetem and found 0 orphan regions

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 40sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall4m 46smaster passed
+1 💚compile1m 19smaster passed
+1 💚shadedjars8m 40sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 45smaster passed
_ Patch Compile Tests _
+1 💚mvninstall4m 29sthe patch passed
+1 💚compile1m 12sthe patch passed
+1 💚javac1m 12sthe patch passed
+1 💚shadedjars8m 17spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 41sthe patch passed
_ Other Tests _
-1 ❌unit10m 11shbase-server in the patch failed.
42m 23s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#3234
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 061f988fd6d0 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / eb9b543
Default JavaAdoptOpenJDK-11.0.10+9
unithttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/1/testReport/
Max. process+thread count762 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/1/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 2sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+1 💚mvninstall3m 57smaster passed
+1 💚compile3m 8smaster passed
+1 💚checkstyle1m 4smaster passed
+1 💚spotbugs2m 4smaster passed
_ Patch Compile Tests _
+1 💚mvninstall3m 41sthe patch passed
+1 💚compile3m 11sthe patch passed
+1 💚javac3m 11sthe patch passed
+1 💚checkstyle1m 2sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck18m 1sPatch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.
+1 💚spotbugs2m 12sthe patch passed
_ Other Tests _
+1 💚asflicense0m 16sThe patch does not generate ASF License warnings.
47m 28s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#3234
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
unameLinux 29f65b080f67 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / eb9b543
Default JavaAdoptOpenJDK-1.8.0_282-b08
Max. process+thread count96 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/1/console
versionsgit=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

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

Yes to one-place only (in the procedure).

I've lost context on why the CJ redundant removes. I defer to the test you ran Andrew at scale.

(I just noticed the wonky split message -- have started a bit of ITBLL over here...)

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 10sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall4m 19smaster passed
+1 💚compile1m 3smaster passed
+1 💚shadedjars8m 56sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 39smaster passed
_ Patch Compile Tests _
+1 💚mvninstall4m 3sthe patch passed
+1 💚compile1m 5sthe patch passed
+1 💚javac1m 5sthe patch passed
+1 💚shadedjars9m 15spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 41sthe patch passed
_ Other Tests _
-1 ❌unit259m 28shbase-server in the patch failed.
292m 41s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#3234
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 6024d088b446 4.15.0-136-generic #140-Ubuntu SMP Thu Jan 28 05:20:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / eb9b543
Default JavaAdoptOpenJDK-1.8.0_282-b08
unithttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/1/testReport/
Max. process+thread count2827 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/1/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@apurtell

apurtell commented May 6, 2021

Copy link
Copy Markdown
ContributorAuthor

(I just noticed the wonky split message -- have started a bit of ITBLL over here...)

I've committed a few changes over the past couple of days that address two issues here. One was an accumulation of SPLIT state regionStates for as long as CatalogJanitor is deferring cleanup, because daughters still have references, because compaction is backed up. The accumulation is fine but it caused concerning warnings at each balancer iteration. Another was a race condition between split handling and regionserver report handling that could cause multiple split procedures to get scheduled for the same split request. Only one could succeed. The others would cause log noise but their failures were harmless. Would be good to get a second opinion.

@apurtell

Copy link
Copy Markdown
ContributorAuthor

Ok, let me rebase this and fix the unit tests.

apurtell added 2 commits May 5, 2021 17:13
…itor
In CatalogJanitor we schedule GCRegionProcedure to clean up both
filesystem and in-memory state after a split, and
GCMultipleMergedRegionsProcedure to do the same for merges. Both of these
procedures clean up in-memory state, but CatalogJanitor also does this
redundantly just after scheduling the procedures. The cleanup should be
done in only one place. Presumably we are using the procedures to do it in
a principled way. Remove the redundancy in CatalogJanitor and fix any
follow on issues, like test failures.
@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 7sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+1 💚mvninstall4m 14smaster passed
+1 💚compile3m 13smaster passed
+1 💚checkstyle1m 4smaster passed
+1 💚spotbugs2m 7smaster passed
_ Patch Compile Tests _
+1 💚mvninstall3m 49sthe patch passed
+1 💚compile3m 17sthe patch passed
+1 💚javac3m 17sthe patch passed
+1 💚checkstyle1m 3sthe patch passed
-0 ⚠️whitespace0m 0sThe patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
+1 💚hadoopcheck18m 39sPatch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.
+1 💚spotbugs2m 18sthe patch passed
_ Other Tests _
+1 💚asflicense0m 16sThe patch does not generate ASF License warnings.
49m 8s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#3234
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
unameLinux ca8965295a6f 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / cc88cf0
Default JavaAdoptOpenJDK-1.8.0_282-b08
whitespacehttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/2/artifact/yetus-general-check/output/whitespace-eol.txt
Max. process+thread count96 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/2/console
versionsgit=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 26sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall4m 32smaster passed
+1 💚compile1m 12smaster passed
+1 💚shadedjars8m 8sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 42smaster passed
_ Patch Compile Tests _
+1 💚mvninstall4m 15sthe patch passed
+1 💚compile1m 12sthe patch passed
+1 💚javac1m 12sthe patch passed
+1 💚shadedjars8m 12spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 40sthe patch passed
_ Other Tests _
-1 ❌unit140m 32shbase-server in the patch failed.
172m 14s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#3234
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 8ed77b4bd87a 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / cc88cf0
Default JavaAdoptOpenJDK-11.0.10+9
unithttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/2/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/2/testReport/
Max. process+thread count4533 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/2/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@apurtell

Copy link
Copy Markdown
ContributorAuthor

TestReplicationSource failure is not related.

[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.hadoop.hbase.replication.regionserver.TestReplicationSource
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 52.258 s - in org.apache.hadoop.hbase.replication.regionserver.TestReplicationSource
[INFO] [INFO] Results:
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0

Actual failing test TestCatalogJanitorInMemoryStates was fixed with e7db51f .

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec2m 42sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall5m 32smaster passed
+1 💚compile1m 31smaster passed
+1 💚shadedjars10m 41sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 48smaster passed
_ Patch Compile Tests _
+1 💚mvninstall5m 1sthe patch passed
+1 💚compile1m 19sthe patch passed
+1 💚javac1m 19sthe patch passed
+1 💚shadedjars10m 39spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 50sthe patch passed
_ Other Tests _
+1 💚unit223m 40shbase-server in the patch passed.
264m 50s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#3234
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 4890c5b69764 4.15.0-136-generic #140-Ubuntu SMP Thu Jan 28 05:20:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / cc88cf0
Default JavaAdoptOpenJDK-1.8.0_282-b08
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/2/testReport/
Max. process+thread count2629 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3234/2/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

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

So we are just removing what scheduled Procs are anyways going to do right, sounds good. +1

@apurtell
apurtell merged commit 6309c09 into apache:masterMay 6, 2021
@apurtell
apurtell deleted the HBASE-25854 branch May 6, 2021 16:13
asfgit pushed a commit that referenced this pull request May 6, 2021
…itor (#3234)
In CatalogJanitor we schedule GCRegionProcedure to clean up both
filesystem and in-memory state after a split, and
GCMultipleMergedRegionsProcedure to do the same for merges. Both of these
procedures clean up in-memory state, but CatalogJanitor also does this
redundantly just after scheduling the procedures. The cleanup should be
done in only one place. Presumably we are using the procedures to do it in
a principled way. Remove the redundancy in CatalogJanitor and fix any
follow on issues, like test failures.
Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Michael Stack <stack@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
asfgit pushed a commit that referenced this pull request May 6, 2021
…itor (#3234)
In CatalogJanitor we schedule GCRegionProcedure to clean up both
filesystem and in-memory state after a split, and
GCMultipleMergedRegionsProcedure to do the same for merges. Both of these
procedures clean up in-memory state, but CatalogJanitor also does this
redundantly just after scheduling the procedures. The cleanup should be
done in only one place. Presumably we are using the procedures to do it in
a principled way. Remove the redundancy in CatalogJanitor and fix any
follow on issues, like test failures.
Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Michael Stack <stack@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
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.

5 participants

@apurtell@Apache-HBase@saintstack@Apache9@virajjasani