Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-21469

Re-visit post* hooks in DDL operations

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.1.1, 2.0.2
    • None
    • None
    • None

    Description

      I have some discuss in HBASE-19953 from here
      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.

      Attachments

        Issue Links

          Activity

            People

              allan163 Allan Yang
              allan163 Allan Yang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: