pankaj72981 commented on a change in pull request #3287:
URL: https://github.com/apache/hbase/pull/3287#discussion_r636684897
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java
##########
@@ -223,6 +253,21 @@ public TableDescriptor get(TableName tableName) {
} catch (NullPointerException | IOException ioe) {
LOG.debug("Exception during readTableDecriptor. Current table name = " +
tableName, ioe);
}
+
+ // Validate whether meta table descriptor is in HBase 2.x format
+ if (TableName.isMetaTableName(tableName) && defaultMetaTableDesc != null) {
+ try {
+ validateMetaTableDescriptor(tdmt);
+ // FS have proper meta table descriptor, we don't need to validate it
again.
+ // Reset defaultMetaTableDesc
+ defaultMetaTableDesc = null;
+ } catch (TableInfoMissingException | NoSuchColumnFamilyException e) {
+ // Meta is still in old format, return the default meta table
descriptor util we have meta
+ // descriptor in HBase 2.x format
+ return defaultMetaTableDesc;
Review comment:
> This seems wrong.
>
> `createMetaTableDescriptorBuilder` should return a builder for what the
current version of the code expects.
>
> If we need fallbacks to ride over an upgrade case, those fallbacks should
be implemented where the errors are happening.
In the current version of code createMetaTableDescriptorBuilder is used only
during HMaster startup via InitMetaProcedure when table info file is missing.
Agree it is a hack (defaultMetaTableDesc = null), where RegionServer will
get the default meta descriptor (createMetaTableDescriptorBuilder) until
HMaster rewrite the proper one.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]