taklwu commented on code in PR #7474:
URL: https://github.com/apache/hbase/pull/7474#discussion_r2609132851
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java:
##########
@@ -3116,16 +3116,9 @@ public ClusterMetrics
getClusterMetricsWithoutCoprocessor(EnumSet<Option> option
if (isActiveMaster() && isInitialized() && assignmentManager !=
null) {
try {
Map<TableName, RegionStatesCount> tableRegionStatesCountMap =
new HashMap<>();
- Map<String, TableDescriptor> tableDescriptorMap =
getTableDescriptors().getAll();
- for (TableDescriptor tableDescriptor :
tableDescriptorMap.values()) {
+ List<TableDescriptor> tableDescriptors =
listTableDescriptors(null, null, null, true);
+ for (TableDescriptor tableDescriptor : tableDescriptors) {
Review Comment:
can we have manual test for this change? I'm wondered if this would filter
any table (non-metatable that filter by `FSUtils.java#isLocalMetaTable`) that
should be considered as foreign to the primary/writer cluster.
`listTableDescriptors` should be loading all the tables from the filesystem
via `FSTableDescriptors.java#getAll()`, where this change does not have a way
to filter the user/foreign table that should not be synced. (should the chore
be always refreshing from filesystem when the meta sync does not trigger from
the read-only replica?)
or are we just trying to remove the redundant logic of rechecking the
foreign meta table ?
but anyhow, the unit test flow does not match the title and please try to
come up a manual test or change the unit test to act as the primary and the
read-only replica.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]