hbase icon indicating copy to clipboard operation
hbase copied to clipboard

HBASE-28197 The configs for using meta replica can conflict

Open sunhelly opened this issue 2 years ago • 9 comments

We should use "hbase.meta.replicas.use" to control the switch of reading meta replicas. But the codes before this PR reading from meta replicas only when "hbase.locator.meta.replicas.mode" is not NONE, it supassed the switch controller. The UT can reproduce the problem.

sunhelly avatar Nov 13 '23 09:11 sunhelly

:confetti_ball: +1 overall

Vote Subsystem Runtime Comment
+0 :ok: reexec 2m 13s Docker mode activated.
_ Prechecks _
+1 :green_heart: dupname 0m 0s No case conflicting files found.
+1 :green_heart: hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 :green_heart: @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 :ok: mvndep 0m 11s Maven dependency ordering for branch
+1 :green_heart: mvninstall 2m 51s master passed
+1 :green_heart: compile 2m 59s master passed
+1 :green_heart: checkstyle 0m 44s master passed
+1 :green_heart: spotless 0m 41s branch has no errors when running spotless:check.
+1 :green_heart: spotbugs 2m 1s master passed
_ Patch Compile Tests _
+0 :ok: mvndep 0m 10s Maven dependency ordering for patch
+1 :green_heart: mvninstall 2m 41s the patch passed
+1 :green_heart: compile 2m 57s the patch passed
+1 :green_heart: javac 2m 57s the patch passed
+1 :green_heart: checkstyle 0m 45s the patch passed
+1 :green_heart: whitespace 0m 0s The patch has no whitespace issues.
+1 :green_heart: hadoopcheck 9m 52s Patch does not cause any errors with Hadoop 3.2.4 3.3.6.
+1 :green_heart: spotless 0m 39s patch has no errors when running spotless:check.
+1 :green_heart: spotbugs 2m 16s the patch passed
_ Other Tests _
+1 :green_heart: asflicense 0m 15s The patch does not generate ASF License warnings.
37m 34s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5518/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/5518
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux aded39ee92b4 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 / e806350bd0
Default Java Eclipse Adoptium-11.0.17+8
Max. process+thread count 82 (vs. ulimit of 30000)
modules C: hbase-client hbase-server U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5518/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 avatar Nov 13 '23 10:11 Apache-HBase

:broken_heart: -1 overall

Vote Subsystem Runtime Comment
+0 :ok: reexec 1m 59s Docker mode activated.
-0 :warning: yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 :ok: mvndep 0m 12s Maven dependency ordering for branch
+1 :green_heart: mvninstall 2m 29s master passed
+1 :green_heart: compile 0m 52s master passed
+1 :green_heart: shadedjars 5m 9s branch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 34s master passed
_ Patch Compile Tests _
+0 :ok: mvndep 0m 11s Maven dependency ordering for patch
+1 :green_heart: mvninstall 2m 23s the patch passed
+1 :green_heart: compile 0m 52s the patch passed
+1 :green_heart: javac 0m 52s the patch passed
+1 :green_heart: shadedjars 5m 5s patch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 34s the patch passed
_ Other Tests _
+1 :green_heart: unit 1m 20s hbase-client in the patch passed.
-1 :x: unit 221m 40s hbase-server in the patch failed.
247m 40s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5518/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/5518
Optional Tests javac javadoc unit shadedjars compile
uname Linux 080cf93794fd 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 / e806350bd0
Default Java Temurin-1.8.0_352-b08
unit https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5518/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5518/1/testReport/
Max. process+thread count 4667 (vs. ulimit of 30000)
modules C: hbase-client hbase-server U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5518/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 avatar Nov 13 '23 13:11 Apache-HBase

:broken_heart: -1 overall

Vote Subsystem Runtime Comment
+0 :ok: reexec 0m 50s Docker mode activated.
-0 :warning: yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 :ok: mvndep 0m 12s Maven dependency ordering for branch
+1 :green_heart: mvninstall 2m 50s master passed
+1 :green_heart: compile 1m 8s master passed
+1 :green_heart: shadedjars 4m 53s branch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 43s master passed
_ Patch Compile Tests _
+0 :ok: mvndep 0m 13s Maven dependency ordering for patch
+1 :green_heart: mvninstall 2m 42s the patch passed
+1 :green_heart: compile 1m 5s the patch passed
+1 :green_heart: javac 1m 5s the patch passed
+1 :green_heart: shadedjars 4m 48s patch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 42s the patch passed
_ Other Tests _
+1 :green_heart: unit 1m 29s hbase-client in the patch passed.
-1 :x: unit 225m 36s hbase-server in the patch failed.
252m 16s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5518/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/5518
Optional Tests javac javadoc unit shadedjars compile
uname Linux 703861b2f86e 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / e806350bd0
Default Java Eclipse Adoptium-11.0.17+8
unit https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5518/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5518/1/testReport/
Max. process+thread count 4648 (vs. ulimit of 30000)
modules C: hbase-client hbase-server U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5518/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 avatar Nov 13 '23 13:11 Apache-HBase

Have you check the ref guide? For me, I think setting the replica mode to something other than NONE indicates that the user wants to use meta replica?

Apache9 avatar Nov 25 '23 04:11 Apache9

Have you check the ref guide? For me, I think setting the replica mode to something other than NONE indicates that the user wants to use meta replica?

Thanks, @Apache9 . The ref guide doesn't bound the relation ship between the two configs. I think, when we enabling the meta replica, we will set both the two configs under normal circumstances. But when encountering problems caused by meta replica, disable it throught the configs is a quick recover method. The key problem here is that we should disable meta replica by only one config("hbase.meta.replicas.use") or both the relevant configs. I prefer the first way, but I'm neutral on both the ways.

sunhelly avatar Nov 27 '23 05:11 sunhelly

So the aim here is to enforce the "LOAD_BALANCE" reading mode only if "USE_META_REPLICAS" is explicitly set?

Yes, @wchevreuil . My initial thought was when "USE_META_REPLICAS" is false, we should not read the value of "LOAD_BALANCE". But this maybe miss some original design idea. Let's wait for a consensus. Thanks.

sunhelly avatar Nov 27 '23 05:11 sunhelly

Have you check the ref guide? For me, I think setting the replica mode to something other than NONE indicates that the user wants to use meta replica?

Thanks, @Apache9 . The ref guide doesn't bound the relation ship between the two configs. I think, when we enabling the meta replica, we will set both the two configs under normal circumstances. But when encountering problems caused by meta replica, disable it throught the configs is a quick recover method. The key problem here is that we should disable meta replica by only one config("hbase.meta.replicas.use") or both the relevant configs. I prefer the first way, but I'm neutral on both the ways.

Maybe at client side we just do not care about hbase.meta.replicas.use? The hbase.meta.replicas.use config is only for server side. So maybe a more suitable way here is that, at server side, like when initialize a region server or master, when hbase.meta.replicas.use is set to false, we force set the replica mode to NONE as it is useless to use other replica modes?

Apache9 avatar Nov 30 '23 02:11 Apache9

Have you check the ref guide? For me, I think setting the replica mode to something other than NONE indicates that the user wants to use meta replica?

Thanks, @Apache9 . The ref guide doesn't bound the relation ship between the two configs. I think, when we enabling the meta replica, we will set both the two configs under normal circumstances. But when encountering problems caused by meta replica, disable it throught the configs is a quick recover method. The key problem here is that we should disable meta replica by only one config("hbase.meta.replicas.use") or both the relevant configs. I prefer the first way, but I'm neutral on both the ways.

Maybe at client side we just do not care about hbase.meta.replicas.use? The hbase.meta.replicas.use config is only for server side. So maybe a more suitable way here is that, at server side, like when initialize a region server or master, when hbase.meta.replicas.use is set to false, we force set the replica mode to NONE as it is useless to use other replica modes?

Thanks, @Apache9 . I think the config hbase.meta.replicas.use appears before hbase.locator.meta.replicas.mode, which is brought by HBASE-25126 to introduce more meta access mode for clients. And at the server side, in the initialization of regionserver and master, the hbase.meta.replicas.use actively force the setting to false, see line https://github.com/apache/hbase/blob/29bfc610d0433f720a34bc47aadca1433bbb1882/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java#L515 and https://github.com/apache/hbase/blob/29bfc610d0433f720a34bc47aadca1433bbb1882/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java#L529. As a result, I think the replica mode should be force set to NONE at both server side and client side. What do you think?

sunhelly avatar Dec 14 '23 04:12 sunhelly

@huaxiangsun WDYT?

Apache9 avatar Dec 14 '23 07:12 Apache9