Skip to content

Conversation

@Jaehui-Lee
Copy link
Contributor

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache9
Copy link
Contributor

Apache9 commented Dec 4, 2025

This problem only affects branch-2.x?

@Jaehui-Lee
Copy link
Contributor Author

@Apache9

This issue also affects the master branch. I've opened a new PR. #7514
Thanks.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes HBASE-29526, addressing an issue where dynamic configuration changes for coprocessors were not being detected properly. The root cause was that the previous implementation compared old and new configuration objects, which failed when the configuration object was mutated in place (as happens during runtime configuration reloads).

Key changes:

  • Replaced configuration object comparison with a comparison of currently loaded coprocessors versus newly configured coprocessors
  • Added getCoprocessorClassNames() method to CoprocessorHost to retrieve fully-qualified class names of loaded coprocessors
  • Updated tests to use the server's own configuration object, properly simulating dynamic configuration reload behavior

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
hbase-server/src/main/java/org/apache/hadoop/hbase/util/CoprocessorConfigurationUtil.java Refactored checkConfigurationChange to compare loaded coprocessors against configuration values instead of comparing two configuration objects; added helper method to check if coprocessors are configured
hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java Added getCoprocessorClassNames() method to retrieve fully-qualified class names of all loaded coprocessors for comparison
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Updated to pass coprocessor host instead of old configuration to checkConfigurationChange
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Updated to pass coprocessor host instead of old configuration to checkConfigurationChange
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Updated to pass coprocessor host instead of old configuration; removed initializeCoprocessorHost helper method in favor of direct instantiation
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerOnlineConfigChange.java Updated tests to use the server's own configuration object (via getConfiguration()) instead of the test utility's configuration, correctly simulating dynamic configuration reload

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +93 to +94
if (coprocessors != null && coprocessors.length > 0) {
return true;
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

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

The hasCoprocessorsConfigured method should parse the className|priority|path format and check for empty class names, similar to how the main checkConfigurationChange method does at lines 65-72. Currently, this method returns true if the array length is greater than 0, even if all entries are empty or whitespace-only strings. This inconsistency could lead to incorrect detection of configuration changes when coprocessorHost is null.

The method should iterate through the coprocessor strings, parse each one using split("\\|"), extract the actual class name from token[0], trim it, and check if it's not null or empty before returning true.

Suggested change
if (coprocessors != null && coprocessors.length > 0) {
return true;
if (coprocessors != null) {
for (String coprocessor : coprocessors) {
// Handle the className|priority|path format
String[] tokens = coprocessor.split("\\|");
String actualClassName = tokens[0].trim();
if (!Strings.isNullOrEmpty(actualClassName)) {
return true;
}
}

Copilot uses AI. Check for mistakes.
@taklwu
Copy link
Contributor

taklwu commented Dec 11, 2025

@Jaehui-Lee is right, it's not working for existing regions, let's have the review against master branch #7514 and then we can come back on here.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ docker 0m 1s Docker failed to build run-specific yetus/hbase:tp-26948}.
Subsystem Report/Notes
GITHUB PR #7506
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/2/console
versions git=2.17.1
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 1m 22s Docker mode activated.
-0 ⚠️ yetus 0m 5s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚 mvninstall 2m 21s branch-2 passed
+1 💚 compile 0m 34s branch-2 passed
+1 💚 javadoc 0m 22s branch-2 passed
+1 💚 shadedjars 3m 58s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 47s the patch passed
+1 💚 compile 0m 31s the patch passed
+1 💚 javac 0m 31s the patch passed
+1 💚 javadoc 0m 18s the patch passed
+1 💚 shadedjars 3m 54s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌ unit 191m 45s /patch-unit-hbase-server.txt hbase-server in the patch failed.
210m 42s
Subsystem Report/Notes
Docker ClientAPI=1.48 ServerAPI=1.48 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/2/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #7506
Optional Tests javac javadoc unit compile shadedjars
uname Linux 578f5dc7c9bf 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 tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 6ac2f7d
Default Java Temurin-1.8.0_412-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/2/testReport/
Max. process+thread count 4055 (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-7506/2/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.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 19s 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 _
_ branch-2 Compile Tests _
+1 💚 mvninstall 2m 50s branch-2 passed
+1 💚 compile 0m 43s branch-2 passed
+1 💚 javadoc 0m 22s branch-2 passed
+1 💚 shadedjars 4m 40s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 2m 13s the patch passed
+1 💚 compile 0m 43s the patch passed
+1 💚 javac 0m 43s the patch passed
+1 💚 javadoc 0m 21s the patch passed
+1 💚 shadedjars 4m 37s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 190m 23s hbase-server in the patch passed.
212m 1s
Subsystem Report/Notes
Docker ClientAPI=1.48 ServerAPI=1.48 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/2/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #7506
Optional Tests javac javadoc unit compile shadedjars
uname Linux 18a9357cca43 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 tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 6ac2f7d
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/2/testReport/
Max. process+thread count 3605 (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-7506/2/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.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 25s Docker mode activated.
-0 ⚠️ yetus 0m 6s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚 mvninstall 2m 49s branch-2 passed
+1 💚 compile 0m 38s branch-2 passed
+1 💚 javadoc 0m 21s branch-2 passed
+1 💚 shadedjars 4m 40s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 2m 12s the patch passed
+1 💚 compile 0m 37s the patch passed
+1 💚 javac 0m 37s the patch passed
+1 💚 javadoc 0m 19s the patch passed
+1 💚 shadedjars 4m 38s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌ unit 199m 29s /patch-unit-hbase-server.txt hbase-server in the patch failed.
221m 0s
Subsystem Report/Notes
Docker ClientAPI=1.48 ServerAPI=1.48 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #7506
Optional Tests javac javadoc unit compile shadedjars
uname Linux 4a57fc51a792 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 tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 6ac2f7d
Default Java Eclipse Adoptium-11.0.23+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7506/2/testReport/
Max. process+thread count 3341 (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-7506/2/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.

Copy link
Contributor

@taklwu taklwu left a comment

Choose a reason for hiding this comment

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

those failures should be unrelated

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.

4 participants