Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into from

Conversation

bbeaudreault
Copy link
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

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 41s Docker mode activated.
-0 ⚠️ yetus 0m 5s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚 mvninstall 3m 51s branch-2 passed
+1 💚 compile 1m 0s branch-2 passed
+1 💚 shadedjars 6m 4s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 40s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 36s the patch passed
+1 💚 compile 0m 58s the patch passed
+1 💚 javac 0m 58s the patch passed
+1 💚 shadedjars 5m 55s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 37s the patch passed
_ Other Tests _
-1 ❌ unit 13m 7s hbase-server in the patch failed.
38m 4s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 8f16e34
Default Java AdoptOpenJDK-1.8.0_282-b08
unit https://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 Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/1/testReport/
Max. process+thread count 1359 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 21s 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.
_ branch-2 Compile Tests _
+1 💚 mvninstall 3m 47s branch-2 passed
+1 💚 compile 3m 17s branch-2 passed
+1 💚 checkstyle 1m 7s branch-2 passed
+1 💚 spotbugs 2m 6s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 32s the patch passed
+1 💚 compile 3m 31s the patch passed
+1 💚 javac 3m 31s the patch passed
+1 💚 checkstyle 1m 7s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 11m 42s Patch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚 spotbugs 2m 12s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 15s The patch does not generate ASF License warnings.
41m 59s
Subsystem Report/Notes
Docker ClientAPI=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 Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 8f16e34
Default Java AdoptOpenJDK-1.8.0_282-b08
Max. process+thread count 96 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/1/console
versions git=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 12s Docker mode activated.
-0 ⚠️ yetus 0m 7s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚 mvninstall 4m 50s branch-2 passed
+1 💚 compile 1m 15s branch-2 passed
+1 💚 shadedjars 7m 55s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 49s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 4m 58s the patch passed
+1 💚 compile 1m 19s the patch passed
+1 💚 javac 1m 19s the patch passed
+1 💚 shadedjars 7m 43s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 41s the patch passed
_ Other Tests _
-1 ❌ unit 16m 38s hbase-server in the patch failed.
48m 52s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 8f16e34
Default Java AdoptOpenJDK-11.0.10+9
unit https://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 Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/1/testReport/
Max. process+thread count 1018 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@@ -240,6 +240,9 @@ public synchronized boolean next(List<Cell> outResults, ScannerContext scannerCo
}
region.startRegionOperation(Operation.SCAN);
try {
if (scannerContext == null) {
Copy link
Contributor Author

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);
}

Copy link
Contributor Author

@bbeaudreault bbeaudreault Aug 11, 2021

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
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
Contributor Author

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
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

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 6s 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.
_ branch-2 Compile Tests _
+1 💚 mvninstall 3m 44s branch-2 passed
+1 💚 compile 3m 11s branch-2 passed
+1 💚 checkstyle 1m 8s branch-2 passed
+1 💚 spotbugs 2m 5s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 18s the patch passed
+1 💚 compile 3m 9s the patch passed
+1 💚 javac 3m 9s the patch passed
+1 💚 checkstyle 1m 7s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 11m 54s Patch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚 spotbugs 2m 14s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 15s The patch does not generate ASF License warnings.
40m 43s
Subsystem Report/Notes
Docker ClientAPI=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 Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 8f16e34
Default Java AdoptOpenJDK-1.8.0_282-b08
Max. process+thread count 95 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/2/console
versions git=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 33s Docker mode activated.
-0 ⚠️ yetus 0m 6s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚 mvninstall 3m 26s branch-2 passed
+1 💚 compile 0m 58s branch-2 passed
+1 💚 shadedjars 5m 58s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 38s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 19s the patch passed
+1 💚 compile 0m 58s the patch passed
+1 💚 javac 0m 58s the patch passed
+1 💚 shadedjars 5m 59s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 36s the patch passed
_ Other Tests _
+1 💚 unit 143m 1s hbase-server in the patch passed.
167m 53s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 8f16e34
Default Java AdoptOpenJDK-1.8.0_282-b08
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/2/testReport/
Max. process+thread count 3689 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/2/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 34s Docker mode activated.
-0 ⚠️ yetus 0m 8s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚 mvninstall 5m 18s branch-2 passed
+1 💚 compile 1m 28s branch-2 passed
+1 💚 shadedjars 8m 22s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 49s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 5m 38s the patch passed
+1 💚 compile 1m 31s the patch passed
+1 💚 javac 1m 31s the patch passed
+1 💚 shadedjars 8m 32s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 50s the patch passed
_ Other Tests _
-1 ❌ unit 228m 56s hbase-server in the patch failed.
265m 39s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 8f16e34
Default Java AdoptOpenJDK-11.0.10+9
unit https://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 Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/2/testReport/
Max. process+thread count 2768 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3576/2/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@saintstack
Copy link
Contributor

Closing as original was reverted.

@saintstack saintstack closed this Aug 16, 2021
Sign up for free to 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