anmolnar commented on PR #7730:
URL: https://github.com/apache/hbase/pull/7730#issuecomment-7356574694

   > 🤖 AI-assisted review (Claude), posted on behalf of @anmolnar as additional 
input. Not a change to his existing approval.
   
   Thanks for the thorough follow-up. I re-reviewed at `4e24613`, which merges 
cleanly with current master, and CI is green across all unit waves. All the 
points from the previous round are addressed:
   
   - Meta table name is now carried on `GetClusterIdResponse`, so new clients 
work against old servers (with a test for the missing-field case).
   - `Connection`/`AsyncConnection#getMetaTableName()` are `default` methods.
   - `META_QUALIFIER_PATTERN` is derived from `VALID_META_TABLE_SUFFIX_REGEX`, 
with edge-case tests.
   - `MetaTableNameStore` uses the `state` family, and 
`TestMigrateAndMirrorMetaLocations` is restored.
   - The master fails fast when the configured suffix differs from the 
persisted name, and backup masters fall back to the configured name.
   - The comparator fast path and `TableName` overload are in, and the minor 
items and fsck nits are fixed.
   
   A few new things came up in the follow-up commit.
   
   ### 1. Other clusters' meta tables are now modifiable (I'd consider this 
must-fix)
   `HMaster.checkTableModifiable` → `isCatalogTable` now compares only against 
this master's own meta table. On shared storage, cluster A could then modify, 
disable or delete `hbase:meta_B`. Narrowing this site was part of my previous 
feedback, and that was a mistake for a safety guard. Going back to 
`TableName.isMetaTableName(tableName)` here keeps every meta-pattern table 
protected, this cluster's own meta included.
   
   ### 2. `InitMetaProcedure.getTableName()` and lock routing
   It still returns the static `hbase:meta`. The new comment says the scheduler 
routes anything matching `isMetaTableName()` to the meta queue, but 
`MasterProcedureScheduler` only does that for `MetaProcedureInterface`, which 
`InitMetaProcedure` doesn't implement. On a cluster with a suffix, it locks the 
`hbase:meta` table queue while other procedures lock `hbase:meta_<suffix>`. The 
risk is low since it's bootstrap-only, but either pass the resolved name in 
(and persist it in the procedure state) or correct the comment.
   
   ### 3. Two `GetClusterId` round trips per connection
   `ConnectionFactory` calls `registry.getClusterId()` and then 
`registry.getMetaTableName()`, and both send `GetClusterId` (so 
`postGetClusterId` coprocessor hooks also fire twice). The server-side comment 
says "without a second RPC". Fetching both values from one response, or caching 
it in the registry, would fix this.
   
   ### 4. Name recomputed on every call
   `MetaTableLocator.getMetaTableName(zkw)`, 
`HBaseServerBase.getDefaultMetaTableName()` and the test utilities call 
`TableName.initializeHbaseMetaTableName(conf)` each time: a config lookup, a 
regex match and a DEBUG log line (`[Read-replica feature] suffix value…`). That 
happens on every ZK meta-location event and on every `GetClusterId` served by a 
backup master. Not a hot path, but resolving it once per server would be 
cleaner.
   
   ### 5. Test gaps
   - Master refusing to start on a configured/persisted name mismatch.
   - A backup master answering `GetClusterId` with the configured name.
   - `checkTableModifiable` rejecting another cluster's meta table (would pin 
#1).
   
   ### 6. Housekeeping
   - The general check reports `javac -0`: `hbase-client` has 2 new compiler 
warnings. Worth a look in `results-compile-javac-hbase-client.txt`.
   - The follow-up roughly doubles the PR and adds multi-cluster-per-JVM 
support. Given the earlier request for more review time, it might be worth 
calling out the scope change here or splitting it into its own JIRA.
   
   Overall this is in much better shape. #1 is the only item I'd treat as 
blocking.


-- 
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]

Reply via email to