[ https://issues.apache.org/jira/browse/HBASE-21469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16687028#comment-16687028 ]
Josh Elser commented on HBASE-21469: ------------------------------------ Thanks for the ping, Allan! > Re-visit post* hooks in DDL operations > -------------------------------------- > > Key: HBASE-21469 > URL: https://issues.apache.org/jira/browse/HBASE-21469 > Project: HBase > Issue Type: Bug > Affects Versions: 2.1.1, 2.0.2 > Reporter: Allan Yang > Assignee: Allan Yang > Priority: Major > > I have some discuss in HBASE-19953 from > [here|https://issues.apache.org/jira/browse/HBASE-19953?focusedCommentId=16673126&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16673126] > In HBASE-19953,[~elserj] want to make sure that the post* hooks are called > only when the procedures finish.But it accidentally turns modifytable and > truncate table request into a sync call, which make clients RPC timeout > easily on big tables. > We should re-visit those postxxx hooks in DDL operations, because they are > now not consistent now: > For DDLs other than modifytable and truncate table, although the call will > wait on the latch, the latch is actually released just after prepare state, > so we still call postxxx hooks before the operation finish. > For DDLs of modifytable and truncate, the latch is only released after the > whole procedure finish. So the effort works(but will cause RPC timeout) > I think these latches are designed for compatibility with 1.x clients. Take > ModifyTable for example, in 1.x, we use admin.getAlterStauts() to check the > alter status, but in 2.x, this method is deprecated and returning inaccurate > result, we have to make 1.x client in a sync wait. > And for the semantics of postxxx hooks in 1.x, we will call them after the > corresponding DDL request return, but actually, the DDL request may not > finished also since we don't want for region assignment. > So, here, we need to discuss the semantics of postxxx hooks in DDL > operations, we need to make it consistent in every DDL operations, do we > really need to make sure this hooks being called only after the operation > finish? What's more, we have postCompletedxxx hooks for that need. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)