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

Delete a family of table online will crash regionserver

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Cannot Reproduce
    • None
    • 2.0.0
    • regionserver
    • None
    • Reviewed

    Description

      Using alter command to delete a family of table online will make the regionsevers that serve the regions of the table crash.

      alter 't', NAME => 'f', METHOD => 'delete'
      

      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.

      Attachments

        1. HBASE-12542-v1.diff
          8 kB
          Shaohui Liu

        Activity

          People

            psomogyi Peter Somogyi
            liushaohui Shaohui Liu
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: