[ 
https://issues.apache.org/jira/browse/HBASE-13394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14510805#comment-14510805
 ] 

Anoop Sam John commented on HBASE-13394:
----------------------------------------

I missed the fact that within the CreateTableHandler we were catching any 
Throwable and doing cache cleanup.  Thanks Ashish for correcting me offline.
On the latest patch
bq.Long procId 
Why this is 'Long' not 'long'?
bq.I still haven't looked into Proc V2 code. So I am not sure what happens if 
create table is failed in execute. I assume the rollback step will be auto 
called then what about the cache, how is entry being removed on 
failure/rollback ?
When there is no procedure support, the CompatibilityLatch handles this as we 
get back the Exception happened and you put the entire code (await call also) 
in try.  But when the procedure support is ON, I can not see this 
MasterQuotaManager#removeTableFromNamespaceQuota  happening on roll back. There 
the latch used is NoopLatch and so you wont be able to get a catch in this 
HMaster code also.  


> 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, 1.1.0
>            Reporter: Y. SREENIVASULU REDDY
>            Assignee: Ashish Singhi
>              Labels: quota
>             Fix For: 2.0.0, 1.1.0
>
>         Attachments: HBASE-13394-v1.patch, HBASE-13394-v2.patch, 
> 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)

Reply via email to