From 5646071c737318abde49696bb79fe203681dc27a Mon Sep 17 00:00:00 2001 From: tedyu Date: Fri, 29 May 2015 02:37:22 -0700 Subject: [PATCH] HBASE-13802 Procedure V2: Master fails to come up due to rollback of create namespace table (Stephen Jiang) --- .../hadoop/hbase/master/procedure/CreateTableProcedure.java | 3 +++ .../hadoop/hbase/master/procedure/DeleteTableProcedure.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateTableProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateTableProcedure.java index f7e2b848b6a..484075251fa 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateTableProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateTableProcedure.java @@ -265,6 +265,9 @@ public class CreateTableProcedure @Override protected boolean acquireLock(final MasterProcedureEnv env) { + if (!env.isInitialized() && !getTableName().isSystemTable() ) { + return false; + } return env.getProcedureQueue().tryAcquireTableExclusiveLock(getTableName(), "create table"); } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java index 6772f0cbea5..c5be27ece31 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java @@ -405,6 +405,8 @@ public class DeleteTableProcedure protected static void deleteTableStates(final MasterProcedureEnv env, final TableName tableName) throws IOException { - ProcedureSyncWait.getMasterQuotaManager(env).removeTableFromNamespaceQuota(tableName); + if (!tableName.isSystemTable()) { + ProcedureSyncWait.getMasterQuotaManager(env).removeTableFromNamespaceQuota(tableName); + } } } \ No newline at end of file