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

Xu Cang commented on HBASE-21025:
---------------------------------

{quote}You can see the code in setDeletedTable, we will clear the cache in a 
finally block, no matter whether the meta deletion is succeeded. I also did the 
same thing when update meta, if we fail then clear the cache. This is 
important, as we do not know if we have successfully updated meta or not when 
there is an exception, so the safe way is to clear the cache, itherwise there 
maybe inconsistency. And next time we will read it directly from meta.
{quote}
Isn't this contradicts with this code logic?

{{if (tableState == null) {}}
{{  LOG.warn(tableName + " has no table state in hbase:meta, assuming 
ENABLED");}}
{{  MetaTableAccessor.updateTableState(connection, tableName, 
TableState.State.ENABLED);}}
{{  fixTableState(new TableState(tableName, TableState.State.ENABLED));}}
{{  tableName2State.put(tableName, TableState.State.ENABLED);}}
{{}}}

[~Apache9]

> Add cache for TableStateManager
> -------------------------------
>
>                 Key: HBASE-21025
>                 URL: https://issues.apache.org/jira/browse/HBASE-21025
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Duo Zhang
>            Assignee: Duo Zhang
>            Priority: Major
>             Fix For: 3.0.0, 2.0.2, 2.2.0, 2.1.1
>
>         Attachments: HBASE-21025-addendum.patch, HBASE-21025-v1.patch, 
> HBASE-21025-v2.patch, HBASE-21025.patch
>
>
> After HBASE-20881, we will check whether a table is disabled in SCP, so we 
> need to add cache for it to improve MTTR, and also reduce the request to meta.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to