hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wellington Chevreuil (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-22417) DeleteTableProcedure.deleteFromMeta method should remove table from Master's table descriptors cache
Date Wed, 15 May 2019 14:00:00 GMT

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

Wellington Chevreuil commented on HBASE-22417:

Thanks for your comments, [~xucang]! 
{quote}In DeleteTableProcedure state machine, there is one state called "DELETE_TABLE_UPDATE_DESC_CACHE".

After this patch, it becomes redundant. Do you think it makes sense to clean it up there?
Yeah, this whole stage would be redundant indeed. I think having the cache cleaned on *deleteFromMeta*
is safer and would make it more cohesive. There would be less chance of inconsistent information
between the cache and current meta state in an event of DeleteTableProcedure stuck or crashed
between these two stages. Also, since *deleteFromMeta* is not private, callers can be unaware
of additional need to clean this cache. That's the case for TruncateTableProcedure for example.
In cases where it calls _DeleteTableProcedure.deleteFromMeta_ on its *TRUNCATE_TABLE_REMOVE_FROM_META*
stage, then takes long time on *TRUNCATE_TABLE_CLEAR_FS_LAYOUT* due to a slow FS, for example,
this inconsistency between cache and meta can cause an 500 error on the Web UI.

{quote}And there is a method called "deleteTableDescriptorCache", should we call this one
Yeah, haven't noticed that one before, definitely makes sense to reuse it.

Am checking on the test failures. Let me know if you agree with the above comment, if so I
can also apply it on a following patch version.

> DeleteTableProcedure.deleteFromMeta method should remove table from Master's table descriptors
> ----------------------------------------------------------------------------------------------------
>                 Key: HBASE-22417
>                 URL: https://issues.apache.org/jira/browse/HBASE-22417
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Wellington Chevreuil
>            Assignee: Wellington Chevreuil
>            Priority: Major
>         Attachments: HBASE-22417.master.001.patch
> DeleteTableProcedure defines a static deleteFromMeta method that's currently used both
by DeleteTableProcedure itself and TruncateTableProcedure. Sometimes, depending on the table
size (and under slower, under performing FileSystems), truncation can take longer to complete *TRUNCATE_TABLE_CLEAR_FS_LAYOUT* stage,
but the given table has already been deleted from meta on previous *TRUNCATE_TABLE_REMOVE_FROM_META* stage.
In this case, features relying on Master's table descriptor's cache might wrongly try to reference
this truncating table. Master Web UI, for example, would try to check this table state and
end up showing a 500 error. 

This message was sent by Atlassian JIRA

View raw message