Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-10628 Fix semantic inconsistency among methods which are exposed to client
  3. HBASE-10595

HBaseAdmin.getTableDescriptor can wrongly get the previous table's TableDescriptor even after the table dir in hdfs is removed

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: master, util
    • Labels:
      None

      Description

      When a table dir (in hdfs) is removed(by outside), HMaster will still return the cached TableDescriptor to client for getTableDescriptor request.

      On the contrary, HBaseAdmin.listTables() is handled correctly in current implementation, for a table whose table dir in hdfs is removed by outside, getTableDescriptor can still retrieve back a valid (old) table descriptor, while listTables says it doesn't exist, this is inconsistent

      The reason for this bug is because HMaster (via FSTableDescriptors) doesn't check if the table dir exists for getTableDescriptor() request, (while it lists all existing table dirs(not firstly respects cache) and returns accordingly for listTables() request)

      When a table is deleted via deleteTable, the cache will be cleared after the table dir and tableInfo file is removed, listTables/getTableDescriptor inconsistency should be transient(though still exists, when table dir is removed while cache is not cleared) and harder to expose

        Attachments

        1. HBASE-10595-trunk_v4.patch
          5 kB
          Honghua Feng
        2. HBASE-10595-trunk_v3.patch
          5 kB
          Honghua Feng
        3. HBASE-10595-trunk_v2.patch
          5 kB
          Honghua Feng
        4. HBASE-10595-trunk_v1.patch
          4 kB
          Honghua Feng

          Issue Links

            Activity

              People

              • Assignee:
                fenghh Honghua Feng
                Reporter:
                fenghh Honghua Feng
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: