Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 198BB17C09 for ; Mon, 6 Apr 2015 05:38:13 +0000 (UTC) Received: (qmail 85604 invoked by uid 500); 6 Apr 2015 05:38:12 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 85558 invoked by uid 500); 6 Apr 2015 05:38:12 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 85547 invoked by uid 99); 6 Apr 2015 05:38:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2015 05:38:12 +0000 Date: Mon, 6 Apr 2015 05:38:12 +0000 (UTC) From: "Ashish Singhi (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-13394) Failed to recreate a table when quota is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-13394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14480952#comment-14480952 ] Ashish Singhi commented on HBASE-13394: --------------------------------------- Thanks Ted, Srikanth and Anoop for looking into this. {quote} bq. Can you please elaborate on why AC would throw an exception in this case (am assuming that user already has necessary permissions) when quota is enabled. I think the steps followed is A user is trying to create table but he has no permission to do so It fails from AC (AC is ON) Now another user having proper permission trying to create the same table name and the Quota manager fails the op. {quote} Yes, that is the case. bq. What if the table creation failed after this pre hook step? Still the same issue will happen with Quota ON right? Can you please tell me the scenario where CreateTableHandler can fail without throwing any exception ? Because I have assumed that on any failure from it, it will throw an exception and within catch clause we are already removing that table from the cache. > Failed to recreate a table when quota is enabled > ------------------------------------------------ > > Key: HBASE-13394 > URL: https://issues.apache.org/jira/browse/HBASE-13394 > Project: HBase > Issue Type: Bug > Components: security > Affects Versions: 2.0.0 > Reporter: Y. SREENIVASULU REDDY > Assignee: Ashish Singhi > Labels: quota > Fix For: 2.0.0 > > Attachments: HBASE-13394.patch > > > Steps to reproduce. > Enable quota by setting {{hbase.quota.enabled}} to true > Create a table say with name 't1', make sure the creation fails after adding this table entry into namespace quota cache. > Now correct the failure and recreate the table 't1'. It fails with below exception. > {noformat} > 2015-04-02 14:23:53,729 | ERROR | FifoRpcScheduler.handler1-thread-23 | Unexpected throwable object | org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2154) > java.lang.IllegalStateException: Table already in the cache t1 > at org.apache.hadoop.hbase.namespace.NamespaceTableAndRegionInfo.addTable(NamespaceTableAndRegionInfo.java:97) > at org.apache.hadoop.hbase.namespace.NamespaceStateManager.addTable(NamespaceStateManager.java:171) > at org.apache.hadoop.hbase.namespace.NamespaceStateManager.checkAndUpdateNamespaceTableCount(NamespaceStateManager.java:147) > at org.apache.hadoop.hbase.namespace.NamespaceAuditor.checkQuotaToCreateTable(NamespaceAuditor.java:76) > at org.apache.hadoop.hbase.quotas.MasterQuotaManager.checkNamespaceTableAndRegionQuota(MasterQuotaManager.java:344) > at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1781) > at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1818) > at org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java:42273) > at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2116) > at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:108) > at org.apache.hadoop.hbase.ipc.FifoRpcScheduler$1.run(FifoRpcScheduler.java:74) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > {noformat} > P.S: Line numbers may not be in sync. -- This message was sent by Atlassian JIRA (v6.3.4#6332)