Skip to content

HBASE-29831 Fix for NPE in region replication (branch-2.5 backport) - #7684

Closed
krconv wants to merge 1 commit into
apache:branch-2.5from
HubSpot:HBASE-29831-read-replicas-npe-branch-2.5
Closed

HBASE-29831 Fix for NPE in region replication (branch-2.5 backport)#7684
krconv wants to merge 1 commit into
apache:branch-2.5from
HubSpot:HBASE-29831-read-replicas-npe-branch-2.5

Conversation

@krconv

@krconvkrconv commented Jan 28, 2026

Copy link
Copy Markdown

Backport to branch-2.5 for PR #7629

Signed-off-by: Chandra Kambham <chandra@apache.org>
Signed-off-by: Peng Lu <lupeng@apache.org>
@krconvkrconv changed the title HBASE-29831 Fix for NPE in region replication (#7629)HBASE-29831 Fix for NPE in region replication (branch-2.5 backport)Jan 28, 2026
@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 52sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 1scodespell was not available.
+0 🆗detsecrets0m 1sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
_ branch-2.5 Compile Tests _
+1 💚mvninstall3m 25sbranch-2.5 passed
+1 💚compile2m 55sbranch-2.5 passed
+1 💚checkstyle0m 39sbranch-2.5 passed
+1 💚spotbugs1m 35sbranch-2.5 passed
+1 💚spotless0m 46sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚mvninstall3m 3sthe patch passed
+1 💚compile2m 53sthe patch passed
+1 💚javac2m 53sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 36sthe patch passed
+1 💚spotbugs1m 41sthe patch passed
+1 💚hadoopcheck22m 39sPatch does not cause any errors with Hadoop 2.10.2 or 3.2.4 3.3.6 3.4.1.
+1 💚spotless0m 44spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 11sThe patch does not generate ASF License warnings.
44m 3s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7684/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#7684
Optional Testsdupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
unameLinux f2735bfd5b41 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 toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2.5 / d89b861
Default JavaEclipse Adoptium-11.0.23+9
Max. process+thread count79 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7684/1/console
versionsgit=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec1m 36sDocker mode activated.
-0 ⚠️yetus0m 5sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2.5 Compile Tests _
+1 💚mvninstall2m 36sbranch-2.5 passed
+1 💚compile0m 43sbranch-2.5 passed
+1 💚javadoc0m 23sbranch-2.5 passed
+1 💚shadedjars4m 30sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚mvninstall2m 21sthe patch passed
+1 💚compile0m 46sthe patch passed
+1 💚javac0m 46sthe patch passed
+1 💚javadoc0m 21sthe patch passed
+1 💚shadedjars4m 28spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌unit185m 47s/patch-unit-hbase-server.txthbase-server in the patch failed.
207m 17s
SubsystemReport/Notes
DockerClientAPI=1.48 ServerAPI=1.48 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7684/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#7684
Optional Testsjavac javadoc unit compile shadedjars
unameLinux 6c4c977ce6b2 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2.5 / d89b861
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7684/1/testReport/
Max. process+thread count3977 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7684/1/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 52sDocker mode activated.
-0 ⚠️yetus0m 5sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2.5 Compile Tests _
+1 💚mvninstall2m 45sbranch-2.5 passed
+1 💚compile0m 44sbranch-2.5 passed
+1 💚javadoc0m 27sbranch-2.5 passed
+1 💚shadedjars5m 11sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚mvninstall2m 26sthe patch passed
+1 💚compile0m 42sthe patch passed
+1 💚javac0m 42sthe patch passed
+1 💚javadoc0m 24sthe patch passed
+1 💚shadedjars5m 7spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit202m 5shbase-server in the patch passed.
225m 35s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7684/1/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR#7684
Optional Testsjavac javadoc unit compile shadedjars
unameLinux fda9150ca05a 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 toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2.5 / d89b861
Default JavaTemurin-1.8.0_412-b08
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7684/1/testReport/
Max. process+thread count2994 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7684/1/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 48sDocker mode activated.
-0 ⚠️yetus0m 6sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2.5 Compile Tests _
+1 💚mvninstall3m 23sbranch-2.5 passed
+1 💚compile0m 50sbranch-2.5 passed
+1 💚javadoc0m 28sbranch-2.5 passed
+1 💚shadedjars6m 1sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚mvninstall2m 51sthe patch passed
+1 💚compile0m 47sthe patch passed
+1 💚javac0m 47sthe patch passed
+1 💚javadoc0m 25sthe patch passed
+1 💚shadedjars5m 56spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit202m 30shbase-server in the patch passed.
228m 8s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7684/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#7684
Optional Testsjavac javadoc unit compile shadedjars
unameLinux 8e1792e05cd2 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 toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2.5 / d89b861
Default JavaEclipse Adoptium-11.0.23+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7684/1/testReport/
Max. process+thread count3139 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7684/1/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@guluo2016

Copy link
Copy Markdown
Member

There is a test case failed (org.apache.hadoop.hbase.regionserver.TestClearRegionBlockCache.testClearBlockCache[1: bucket]), but it’s unrelated to this PR.
let me take a look at this error first.

@guluo2016guluo2016 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

// they come online.
if (useCache && locations.size() == 1 && TableName.isMetaTableName(tableName)) {
if (tableDescriptors.get(tableName).getRegionReplication() > 1) {
TableDescriptor td = tableDescriptors.get(tableName);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I just noticed a few additional concerns after approving
I found the issue doesn't seem to exist for branch-2.5.
The code is only executed when seCache && locations.size() == 1 && TableName.isMetaTableName(tableName) is true, whch means that it's meta table, and the td of meta table is not null in here . right ? @krconv

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see; agreed it doesn't seem to apply here. Thank you for finding that! I'll close this.

@krconvkrconv closed this Feb 2, 2026
@krconv
krconv deleted the HBASE-29831-read-replicas-npe-branch-2.5 branch February 2, 2026 11:56
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

@krconv@Apache-HBase@guluo2016