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

Backport "HBASE-28354 RegionSizeCalculator throws NPE when regions are in transition (#5699)" to branch-2.6 #5730

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

ndimiduk
Copy link
Member

When a region is in transition, it may briefly have a null ServerName in meta. The RegionSizeCalculator calls RegionLocator.getAllRegionLocations() and does not handle the possibility that a RegionLocation.getServerName() could be null. The ServerName is eventually passed into an Admin call, which results in an NPE.

This has come up in other contexts. For example, taking a look at getAllRegionLocations() impl, we have checks to ensure that we don't call null server names. We need to similarly handle the possibility of nulls in RegionSizeCalculator.

…ition (apache#5699)

When a region is in transition, it may briefly have a null ServerName in meta. The
RegionSizeCalculator calls RegionLocator.getAllRegionLocations() and does not handle the
possibility that a RegionLocation.getServerName() could be null. The ServerName is eventually
passed into an Admin call, which results in an NPE.

This has come up in other contexts. For example, taking a look at getAllRegionLocations() impl, we
have checks to ensure that we don't call null server names. We need to similarly handle the
possibility of nulls in RegionSizeCalculator.

Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: Hui Ruan <huiruan@apache.org>
@ndimiduk ndimiduk added the backport This PR is a back port of some issue or issues already committed to master label Feb 29, 2024
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 55s 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.6 Compile Tests _
+1 💚 mvninstall 4m 20s branch-2.6 passed
+1 💚 compile 0m 43s branch-2.6 passed
+1 💚 checkstyle 0m 14s branch-2.6 passed
+1 💚 spotless 0m 54s branch has no errors when running spotless:check.
+1 💚 spotbugs 0m 39s branch-2.6 passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 15s the patch passed
+1 💚 compile 0m 50s the patch passed
+1 💚 javac 0m 50s the patch passed
+1 💚 checkstyle 0m 20s 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 2.10.2 or 3.3.6.
+1 💚 spotless 0m 52s patch has no errors when running spotless:check.
+1 💚 spotbugs 1m 4s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 13s The patch does not generate ASF License warnings.
28m 3s
Subsystem Report/Notes
Docker ClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5730/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #5730
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux 88cbefb8e125 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2.6 / 5798470
Default Java Eclipse Adoptium-11.0.17+8
Max. process+thread count 77 (vs. ulimit of 30000)
modules C: hbase-mapreduce U: hbase-mapreduce
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5730/1/console
versions git=2.34.1 maven=3.8.6 spotbugs=4.7.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 0m 40s Docker mode activated.
-0 ⚠️ yetus 0m 4s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2.6 Compile Tests _
+1 💚 mvninstall 3m 2s branch-2.6 passed
+1 💚 compile 0m 21s branch-2.6 passed
+1 💚 shadedjars 5m 25s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 17s branch-2.6 passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 50s the patch passed
+1 💚 compile 0m 21s the patch passed
+1 💚 javac 0m 21s the patch passed
+1 💚 shadedjars 5m 17s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 16s the patch passed
_ Other Tests _
+1 💚 unit 18m 21s hbase-mapreduce in the patch passed.
38m 7s
Subsystem Report/Notes
Docker ClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5730/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #5730
Optional Tests javac javadoc unit shadedjars compile
uname Linux 275c272f6500 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2.6 / 5798470
Default Java Eclipse Adoptium-11.0.17+8
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5730/1/testReport/
Max. process+thread count 3353 (vs. ulimit of 30000)
modules C: hbase-mapreduce U: hbase-mapreduce
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5730/1/console
versions git=2.34.1 maven=3.8.6
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 55s 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.6 Compile Tests _
+1 💚 mvninstall 4m 12s branch-2.6 passed
+1 💚 compile 0m 32s branch-2.6 passed
+1 💚 shadedjars 8m 1s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 24s branch-2.6 passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 38s the patch passed
+1 💚 compile 0m 25s the patch passed
+1 💚 javac 0m 25s the patch passed
+1 💚 shadedjars 7m 21s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 20s the patch passed
_ Other Tests _
+1 💚 unit 24m 53s hbase-mapreduce in the patch passed.
52m 16s
Subsystem Report/Notes
Docker ClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5730/1/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #5730
Optional Tests javac javadoc unit shadedjars compile
uname Linux ae2d3aafa029 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2.6 / 5798470
Default Java Temurin-1.8.0_352-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5730/1/testReport/
Max. process+thread count 2682 (vs. ulimit of 30000)
modules C: hbase-mapreduce U: hbase-mapreduce
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5730/1/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ndimiduk ndimiduk merged commit 9167290 into apache:branch-2.6 Feb 29, 2024
1 check passed
@ndimiduk ndimiduk deleted the 28354-branch-2.6 branch February 29, 2024 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport This PR is a back port of some issue or issues already committed to master
Projects
None yet
3 participants