Skip to content

HBASE-26122: Only create ScannerContext for Gets with setMaxResultSize > 0 (ADDENDUM) - #3576

Closed
bbeaudreault wants to merge 2 commits into
apache:branch-2from
bbeaudreault:branch_2_addendum
Closed

HBASE-26122: Only create ScannerContext for Gets with setMaxResultSize > 0 (ADDENDUM)#3576
bbeaudreault wants to merge 2 commits into
apache:branch-2from
bbeaudreault:branch_2_addendum

Conversation

@bbeaudreault

Copy link
Copy Markdown
Contributor

@saintstack After your suggestion in #3532 I had meant to also apply the change to RSRpcServices, but got pulled away and didn't submit before you merged.

This small patch applies that same change to RSRpcServices. I'll include this in the master branch PR

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 41sDocker mode activated.
-0 ⚠️yetus0m 5sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚mvninstall3m 51sbranch-2 passed
+1 💚compile1m 0sbranch-2 passed
+1 💚shadedjars6m 4sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 40sbranch-2 passed
_ Patch Compile Tests _
+1 💚mvninstall3m 36sthe patch passed
+1 💚compile0m 58sthe patch passed
+1 💚javac0m 58sthe patch passed
+1 💚shadedjars5m 55spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 37sthe patch passed
_ Other Tests _
-1 ❌unit13m 7shbase-server in the patch failed.
38m 4s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/1/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR#3576
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 07ba3b0e553c 4.15.0-151-generic #157-Ubuntu SMP Fri Jul 9 23:07:57 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2 / 8f16e34
Default JavaAdoptOpenJDK-1.8.0_282-b08
unithttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/1/artifact/yetus-jdk8-hadoop2-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/1/testReport/
Max. process+thread count1359 (vs. ulimit of 12500)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/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 21sDocker 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.
_ branch-2 Compile Tests _
+1 💚mvninstall3m 47sbranch-2 passed
+1 💚compile3m 17sbranch-2 passed
+1 💚checkstyle1m 7sbranch-2 passed
+1 💚spotbugs2m 6sbranch-2 passed
_ Patch Compile Tests _
+1 💚mvninstall3m 32sthe patch passed
+1 💚compile3m 31sthe patch passed
+1 💚javac3m 31sthe patch passed
+1 💚checkstyle1m 7sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck11m 42sPatch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚spotbugs2m 12sthe patch passed
_ Other Tests _
+1 💚asflicense0m 15sThe patch does not generate ASF License warnings.
41m 59s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#3576
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
unameLinux 0a2a37140ff4 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 revisionbranch-2 / 8f16e34
Default JavaAdoptOpenJDK-1.8.0_282-b08
Max. process+thread count96 (vs. ulimit of 12500)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/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.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 12sDocker mode activated.
-0 ⚠️yetus0m 7sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚mvninstall4m 50sbranch-2 passed
+1 💚compile1m 15sbranch-2 passed
+1 💚shadedjars7m 55sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 49sbranch-2 passed
_ Patch Compile Tests _
+1 💚mvninstall4m 58sthe patch passed
+1 💚compile1m 19sthe patch passed
+1 💚javac1m 19sthe patch passed
+1 💚shadedjars7m 43spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 41sthe patch passed
_ Other Tests _
-1 ❌unit16m 38shbase-server in the patch failed.
48m 52s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#3576
Optional Testsjavac javadoc unit shadedjars compile
unameLinux be4ea46360c7 4.15.0-147-generic #151-Ubuntu SMP Fri Jun 18 19:21:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2 / 8f16e34
Default JavaAdoptOpenJDK-11.0.10+9
unithttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/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-3576/1/testReport/
Max. process+thread count1018 (vs. ulimit of 12500)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/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.

}
region.startRegionOperation(Operation.SCAN);
try {
if (scannerContext == null) {

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.

@saintstack if you'd prefer, I can solve this at the source where we call next with null scannerContext in RsRpcServices and HRegion. It felt cleaner to do here, since we already have a default context and I can solve both issues with 1 change. The alternative would be to add another if branch in the 2 callers, something like:

if (scannerContext == null) {
scanner.next(results);
} else {
scanner.next(results, scannerContext);
}

@bbeaudreaultbbeaudreaultAug 11, 2021

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.

It's also worth noting that this means the original concern "every get will now have a scanner context, when it used to not" actually seems incorrect since each RegionScannerImpl would create a default scanner context if none is provided. I should have noticed this before straight up fixing your suggestion.

I don't know enough about the inner workings of ScannerContext to know the performance implications of one context shape (the default) vs another (with max result size). If there's no real difference, than perhaps the real change here is to just go back to creating a ScannerContext for every get like I originally did.

Will wait for your thoughts

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.

After your finding, it seems like your original PR is the way to go. Thanks for figuring it.

I reverted the branch-2 apply. One thought if you are making a new PR is for the javadoc on setMaxResultSize; you say, 'The user is required to handle this case.'... Perhaps add example of what they might do... i.e. a re-get w/ filter say?

Thanks @bbeaudreault

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.

I guess the remaining implication of this would be we are now creating 2 ScannerContext for every Get instead of 1. So I'll just keep the behavior of only creating a ScannerContext if necessary.

Closing this PR and submitting a follow-up, since the original was reverted.

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 forgot to submit comment from earlier this mornings... see above @bbeaudreault Thanks.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 6sDocker 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.
_ branch-2 Compile Tests _
+1 💚mvninstall3m 44sbranch-2 passed
+1 💚compile3m 11sbranch-2 passed
+1 💚checkstyle1m 8sbranch-2 passed
+1 💚spotbugs2m 5sbranch-2 passed
_ Patch Compile Tests _
+1 💚mvninstall3m 18sthe patch passed
+1 💚compile3m 9sthe patch passed
+1 💚javac3m 9sthe patch passed
+1 💚checkstyle1m 7sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck11m 54sPatch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚spotbugs2m 14sthe patch passed
_ Other Tests _
+1 💚asflicense0m 15sThe patch does not generate ASF License warnings.
40m 43s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#3576
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
unameLinux 0dc43a421e09 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 revisionbranch-2 / 8f16e34
Default JavaAdoptOpenJDK-1.8.0_282-b08
Max. process+thread count95 (vs. ulimit of 12500)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/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 33sDocker mode activated.
-0 ⚠️yetus0m 6sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚mvninstall3m 26sbranch-2 passed
+1 💚compile0m 58sbranch-2 passed
+1 💚shadedjars5m 58sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 38sbranch-2 passed
_ Patch Compile Tests _
+1 💚mvninstall3m 19sthe patch passed
+1 💚compile0m 58sthe patch passed
+1 💚javac0m 58sthe patch passed
+1 💚shadedjars5m 59spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 36sthe patch passed
_ Other Tests _
+1 💚unit143m 1shbase-server in the patch passed.
167m 53s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/2/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR#3576
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 111657109fcb 4.15.0-151-generic #157-Ubuntu SMP Fri Jul 9 23:07:57 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2 / 8f16e34
Default JavaAdoptOpenJDK-1.8.0_282-b08
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/2/testReport/
Max. process+thread count3689 (vs. ulimit of 12500)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/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.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 34sDocker mode activated.
-0 ⚠️yetus0m 8sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚mvninstall5m 18sbranch-2 passed
+1 💚compile1m 28sbranch-2 passed
+1 💚shadedjars8m 22sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 49sbranch-2 passed
_ Patch Compile Tests _
+1 💚mvninstall5m 38sthe patch passed
+1 💚compile1m 31sthe patch passed
+1 💚javac1m 31sthe patch passed
+1 💚shadedjars8m 32spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 50sthe patch passed
_ Other Tests _
-1 ❌unit228m 56shbase-server in the patch failed.
265m 39s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#3576
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 1d6c36793376 4.15.0-147-generic #151-Ubuntu SMP Fri Jun 18 19:21:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2 / 8f16e34
Default JavaAdoptOpenJDK-11.0.10+9
unithttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/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-3576/2/testReport/
Max. process+thread count2768 (vs. ulimit of 12500)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/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.

@saintstack

Copy link
Copy Markdown
Contributor

Closing as original was reverted.

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

@bbeaudreault@Apache-HBase@saintstack