You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Mike Drob (JIRA)" <ji...@apache.org> on 2017/07/01 01:06:00 UTC

[jira] [Commented] (HBASE-12542) Delete a family of table online will crash regionserver

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

Mike Drob commented on HBASE-12542:
-----------------------------------

bq. No, use of EnvironmentEdgeManager is strongly preferred and we should be rejecting patches that use System.currentTimeMillis directly. Stack was simply pointing out that new contributors will be confused because of legacy use of System.currentTimeMillis in the code today. Hope that clears it up.
[~apurtell], [~stack] - has this been captured in docs, or possibly a custom code enforcement rule (checkstyle? findbugs? something else?)

> Delete a family of table online will crash regionserver 
> --------------------------------------------------------
>
>                 Key: HBASE-12542
>                 URL: https://issues.apache.org/jira/browse/HBASE-12542
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>            Reporter: Liu Shaohui
>            Assignee: Liu Shaohui
>            Priority: Critical
>             Fix For: 2.0.0
>
>         Attachments: HBASE-12542-v1.diff
>
>
> Using alter command to delete a family of table online will make the regionsevers that serve the regions of the table crash.
> {code}
> alter 't', NAME => 'f', METHOD => 'delete'
> {code}
> The reason is that TableDeleteFamilyHandler in HMaster delete the family dir firstly and then reopen all the regions of table.
> When the regionserver reopen the region, it will crash for the exception in flushing memstore to hfile of the deleted family during closing the region, because the parent dir of the hfile has been deleted in TableDeleteFamilyHandler.
> See: TableDeleteFamilyHandler.java #57
> A simple solution is change the order of operations in TableDeleteFamilyHandler.
> - update table descriptor first, 
> - reopen all the regions,
> - delete the the family dir at last.
> Suggestions are welcomed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)