Skip to content

Conversation

@teamconfx
Copy link
Contributor

Fix for HBASE-29805

Issue

A NullPointerException occurred in AbstractRpcClient.createAddr() when attempting to split a region after a RegionServer restart. The root cause was that node.getRegionLocation() can return null when a region is OPEN but not yet assigned to a server, and this wasn't being checked in SplitTableRegionProcedure.checkSplittable().

The Fix

Modified SplitTableRegionProcedure.java at line 208-227 to add an explicit null check for regionLocation before it's used:

  if (node != null) {
    // Check if region is assigned to a server before proceeding
    ServerName regionLocation = node.getRegionLocation();
    if (regionLocation == null) {
      throw new DoNotRetryIOException("Region " + regionToSplit.getShortNameToLog()
        + " is not assigned to any server. Cannot check splittability.");
    }
    // ... rest of the code uses regionLocation variable instead of node.getRegionLocation()
  }

Changes Made

  • Added null check for regionLocation that throws a meaningful DoNotRetryIOException
  • Stored node.getRegionLocation() in a local variable regionLocation to avoid redundant method calls
  • Updated subsequent code to use the local regionLocation variable

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 29s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
_ master Compile Tests _
+1 💚 mvninstall 3m 31s master passed
+1 💚 compile 3m 32s master passed
+1 💚 checkstyle 1m 1s master passed
+1 💚 spotbugs 1m 42s master passed
+1 💚 spotless 0m 53s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚 mvninstall 3m 8s the patch passed
+1 💚 compile 3m 32s the patch passed
+1 💚 javac 3m 32s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 59s the patch passed
+1 💚 spotbugs 1m 44s the patch passed
+1 💚 hadoopcheck 12m 11s Patch does not cause any errors with Hadoop 3.3.6 3.4.1.
+1 💚 spotless 0m 46s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 11s The patch does not generate ASF License warnings.
41m 36s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7668/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #7668
JIRA Issue HBASE-29805
Optional Tests dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
uname Linux 056739229e6b 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 master / 4104c04
Default Java Eclipse Adoptium-17.0.11+9
Max. process+thread count 84 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7668/1/console
versions git=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 28s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 3m 38s master passed
+1 💚 compile 1m 4s master passed
+1 💚 javadoc 0m 31s master passed
+1 💚 shadedjars 6m 0s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 3m 11s the patch passed
+1 💚 compile 1m 0s the patch passed
+1 💚 javac 1m 0s the patch passed
+1 💚 javadoc 0m 28s the patch passed
+1 💚 shadedjars 5m 56s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 234m 26s hbase-server in the patch passed.
262m 15s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7668/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #7668
JIRA Issue HBASE-29805
Optional Tests javac javadoc unit compile shadedjars
uname Linux 6f1c3ab6febd 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 master / 4104c04
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7668/1/testReport/
Max. process+thread count 4591 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7668/1/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

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.

2 participants