NihalJain commented on code in PR #5579:
URL: https://github.com/apache/hbase/pull/5579#discussion_r1429025305


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateTableProcedure.java:
##########
@@ -98,6 +99,15 @@ protected Flow executeFromState(final MasterProcedureEnv 
env, final CreateTableS
           DeleteTableProcedure.deleteFromFs(env, getTableName(), newRegions, 
true);
           newRegions = createFsLayout(env, tableDescriptor, newRegions);
           
env.getMasterServices().getTableDescriptors().update(tableDescriptor, true);
+          
setNextState(CreateTableState.CREATE_TABLE_SYNC_ERASURE_CODING_POLICY);
+          break;
+        case CREATE_TABLE_SYNC_ERASURE_CODING_POLICY:
+          if (tableDescriptor.getErasureCodingPolicy() != null) {

Review Comment:
   The if condition should be moved to previous step where we check for this if 
and set the next step to be either `CREATE_TABLE_SYNC_ERASURE_CODING_POLICY` or 
`CREATE_TABLE_ADD_TO_META`. This will also ensure the extra step is never 
called if ECP is not configured to the table.
   
   We can do same in other procedures too.



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