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

Remove the unneccesary info cf deletion in DeleteTableProcedure#deleteFromMeta

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0-alpha-1, 2.3.0, 2.0.6, 2.2.1, 2.1.6
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      I saw the deleteFromMeta() method in DeleteTableProcedure & TruncateTableProcedure:

      protected static void deleteFromMeta(final MasterProcedureEnv env,
          final TableName tableName, List<RegionInfo> regions) throws IOException {
        MetaTableAccessor.deleteRegions(env.getMasterServices().getConnection(), regions);
      
        // Clean any remaining rows for this table.
        cleanAnyRemainingRows(env, tableName);
      
        // clean region references from the server manager
        env.getMasterServices().getServerManager().removeRegions(regions);
      
        // Clear Favored Nodes for this table
        FavoredNodesManager fnm = env.getMasterServices().getFavoredNodesManager();
        if (fnm != null) {
          fnm.deleteFavoredNodesForRegions(regions);
        }
      }
      

      1. deleteRegions : delete the info column family first;
      2. cleanAnyRemainingRows : delete the whole row for regions then.

      In fact, we can only change to delete the whole row, no need the extra info cf deletion any more.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                openinx Zheng Hu
                Reporter:
                openinx Zheng Hu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: