Skip to content

HBASE-27944:HStore.needsCompaction() should return false if we disable comapction against a table - #5303

Closed
guluo2016 wants to merge 2 commits into
apache:masterfrom
guluo2016:compaction_judgment
Closed

HBASE-27944:HStore.needsCompaction() should return false if we disable comapction against a table#5303
guluo2016 wants to merge 2 commits into
apache:masterfrom
guluo2016:compaction_judgment

Conversation

@guluo2016

Copy link
Copy Markdown
Member

Details see:HBASE-27944

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 42sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 1sNo 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 31smaster passed
+1 💚compile3m 19smaster passed
+1 💚checkstyle0m 41smaster passed
+1 💚spotless0m 51sbranch has no errors when running spotless:check.
+1 💚spotbugs1m 47smaster passed
_ Patch Compile Tests _
+1 💚mvninstall3m 41sthe patch passed
+1 💚compile3m 1sthe patch passed
-0 ⚠️javac3m 1shbase-server generated 1 new + 194 unchanged - 1 fixed = 195 total (was 195)
+1 💚checkstyle0m 42sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck14m 5sPatch does not cause any errors with Hadoop 3.2.4 3.3.5.
+1 💚spotless1m 4spatch has no errors when running spotless:check.
+1 💚spotbugs2m 37sthe patch passed
_ Other Tests _
+1 💚asflicense0m 14sThe patch does not generate ASF License warnings.
46m 3s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5303/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#5303
JIRA IssueHBASE-27944
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux 14d3d01976b5 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / cd3f94d
Default JavaEclipse Adoptium-11.0.17+8
javachttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5303/1/artifact/yetus-general-check/output/diff-compile-javac-hbase-server.txt
Max. process+thread count82 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5303/1/console
versionsgit=2.34.1 maven=3.8.6 spotbugs=4.7.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 🆗reexec0m 46sDocker 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 33smaster passed
+1 💚compile1m 12smaster passed
+1 💚shadedjars6m 18sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 37smaster passed
_ Patch Compile Tests _
+1 💚mvninstall3m 40sthe patch passed
+1 💚compile0m 55sthe patch passed
+1 💚javac0m 55sthe patch passed
+1 💚shadedjars5m 42spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 26sthe patch passed
_ Other Tests _
+1 💚unit215m 30shbase-server in the patch passed.
243m 36s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5303/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#5303
JIRA IssueHBASE-27944
Optional Testsjavac javadoc unit shadedjars compile
unameLinux b0096da4a62a 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / cd3f94d
Default JavaEclipse Adoptium-11.0.17+8
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5303/1/testReport/
Max. process+thread count4640 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5303/1/console
versionsgit=2.34.1 maven=3.8.6
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 10sDocker 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 💚mvninstall2m 48smaster passed
+1 💚compile0m 44smaster passed
+1 💚shadedjars5m 8sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 27smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 44sthe patch passed
+1 💚compile0m 49sthe patch passed
+1 💚javac0m 49sthe patch passed
+1 💚shadedjars5m 17spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 26sthe patch passed
_ Other Tests _
+1 💚unit233m 56shbase-server in the patch passed.
258m 15s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5303/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#5303
JIRA IssueHBASE-27944
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 03d120b7a63c 5.4.0-152-generic #169-Ubuntu SMP Tue Jun 6 22:23:09 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / cd3f94d
Default JavaTemurin-1.8.0_352-b08
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5303/1/testReport/
Max. process+thread count4338 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5303/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9

Copy link
Copy Markdown
Contributor

Where do we call this method? Maybe at the caller place, we have already checked whether compaction is enabled at table level?

@guluo2016

Copy link
Copy Markdown
MemberAuthor

Maybe at the caller place, we have already checked whether compaction is enabled at table level?

Yes, we indeed check checked whether compaction is enabled, for example The code :

if (this.rsServices != null && store.needsCompaction()) {
this.rsServices.getCompactionRequestor().requestSystemCompaction(this, store,
"bulkload hfiles request compaction", true);
LOG.info("Request compaction for region {} family {} after bulk load",
this.getRegionInfo().getEncodedName(), store.getColumnFamilyName());
}

We will check whether compaction is enabled by calling this.rsServices.getCompactionRequestor().requestSystemCompaction after calling store.needsCompaction

Where do we call this method?

And this method would be called in these place.
2023-06-25_131837

In here, I mean, since the main function of needsCompaction() is to check whether to need compaction, so even if we would check whether compaction after calling this method, I still think it is not right to return true for a disabled comapction table.

@Apache9

Copy link
Copy Markdown
Contributor

For me, I think different level has different checks, you do not need to do all the checks at every level. Here, if we always request compaction at region level from outside, it is not necessary to check whether we enable compaction at table level again, as we will check it at region level.

@guluo2016

Copy link
Copy Markdown
MemberAuthor

I think different level has different checks, you do not need to do all the checks at every level. Here, if we always request compaction at region level from outside,

Thanks for your comments, I understand

@guluo2016
guluo2016 deleted the compaction_judgment branch August 27, 2023 14:36
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.

3 participants

@guluo2016@Apache-HBase@Apache9