virajjasani commented on a change in pull request #3417:
URL: https://github.com/apache/hbase/pull/3417#discussion_r661632460



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
##########
@@ -953,9 +956,26 @@ private void 
finishActiveMasterInitialization(MonitoredTask status)
     if (!waitForMetaOnline()) {
       return;
     }
+    TableDescriptor metaDescriptor = tableDescriptors.get(
+        TableName.META_TABLE_NAME);
+    final ColumnFamilyDescriptor tableFamilyDesc = metaDescriptor
+        .getColumnFamily(HConstants.TABLE_FAMILY);
+    final ColumnFamilyDescriptor replBarrierFamilyDesc =
+        metaDescriptor.getColumnFamily(HConstants.REPLICATION_BARRIER_FAMILY);
+
     this.assignmentManager.joinCluster();
     // The below depends on hbase:meta being online.
-    this.tableStateManager.start();
+    try {
+      this.tableStateManager.start();
+    } catch (NoSuchColumnFamilyException e) {
+      if (tableFamilyDesc == null && replBarrierFamilyDesc == null) {

Review comment:
       > Is there a case that one might be in place but not the other -- I 
don't know-- and does the code do right thing(I've not checked)
   
   Exactly, the case where either 'table' or 'repl_barrier' is missing might be 
weird case and should not happen given that HBase 2 upgrades are not going to 
face missing CF issues. That's why I kept `&&` here instead of `||` to make 
sure we are specifically handling HBase 1 to 2.3+ upgrade case.
   FYI @anoopsjohn 




-- 
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: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to