HBASE-25255 Addendum wait for meta loaded instead of master initialized for system table creation

This commit is contained in:
Duo Zhang 2020-11-13 15:19:09 +08:00
parent f89faf3ac8
commit 09aaa68be4
1 changed files with 10 additions and 0 deletions

View File

@ -234,6 +234,16 @@ public class CreateTableProcedure
}
}
@Override
protected boolean waitInitialized(MasterProcedureEnv env) {
if (getTableName().isSystemTable()) {
// Creating system table is part of the initialization, so only wait for meta loaded instead
// of waiting for master fully initialized.
return env.getAssignmentManager().waitMetaLoaded(this);
}
return super.waitInitialized(env);
}
private boolean prepareCreate(final MasterProcedureEnv env) throws IOException {
final TableName tableName = getTableName();
if (env.getMasterServices().getTableDescriptors().exists(tableName)) {