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.5 #5731

Merged
merged 1 commit into from
Mar 1, 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 51s 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.5 Compile Tests _
+1 💚 mvninstall 3m 41s branch-2.5 passed
+1 💚 compile 0m 47s branch-2.5 passed
+1 💚 checkstyle 0m 18s branch-2.5 passed
+1 💚 spotless 0m 56s branch has no errors when running spotless:check.
+1 💚 spotbugs 0m 38s branch-2.5 passed
_ Patch Compile Tests _
+1 💚 mvninstall 4m 9s the patch passed
+1 💚 compile 0m 40s the patch passed
+1 💚 javac 0m 40s the patch passed
+1 💚 checkstyle 0m 12s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 16m 40s Patch does not cause any errors with Hadoop 2.10.2 or 3.2.4 3.3.6.
+1 💚 spotless 0m 55s patch has no errors when running spotless:check.
+1 💚 spotbugs 0m 59s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 12s The patch does not generate ASF License warnings.
32m 57s
Subsystem Report/Notes
Docker ClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5731/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #5731
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux 06bd7f95431a 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.5 / cf1bded
Default Java Eclipse Adoptium-11.0.17+8
Max. process+thread count 81 (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-5731/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 53s 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.5 Compile Tests _
+1 💚 mvninstall 3m 37s branch-2.5 passed
+1 💚 compile 0m 24s branch-2.5 passed
+1 💚 shadedjars 6m 53s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 20s branch-2.5 passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 24s the patch passed
+1 💚 compile 0m 24s the patch passed
+1 💚 javac 0m 24s the patch passed
+1 💚 shadedjars 6m 32s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 19s the patch passed
_ Other Tests _
+1 💚 unit 16m 26s hbase-mapreduce in the patch passed.
40m 39s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5731/1/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #5731
Optional Tests javac javadoc unit shadedjars compile
uname Linux 46e131254c43 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 tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2.5 / cf1bded
Default Java Temurin-1.8.0_352-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5731/1/testReport/
Max. process+thread count 2599 (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-5731/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 50s 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.5 Compile Tests _
+1 💚 mvninstall 4m 31s branch-2.5 passed
+1 💚 compile 0m 33s branch-2.5 passed
+1 💚 shadedjars 7m 24s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 20s branch-2.5 passed
_ Patch Compile Tests _
+1 💚 mvninstall 4m 32s the patch passed
+1 💚 compile 0m 35s the patch passed
+1 💚 javac 0m 35s the patch passed
+1 💚 shadedjars 7m 48s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 21s the patch passed
_ Other Tests _
+1 💚 unit 22m 48s hbase-mapreduce in the patch passed.
51m 12s
Subsystem Report/Notes
Docker ClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5731/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #5731
Optional Tests javac javadoc unit shadedjars compile
uname Linux 912ad712c60a 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.5 / cf1bded
Default Java Eclipse Adoptium-11.0.17+8
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5731/1/testReport/
Max. process+thread count 2821 (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-5731/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 643d6b7 into apache:branch-2.5 Mar 1, 2024
1 check passed
@ndimiduk ndimiduk deleted the 28354-branch-2.5 branch March 1, 2024 05:25
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