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

SnapshotManager#restoreSnapshot not update table and region count quota correctly when encountering exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 1.3.0, 1.2.1, 1.1.5, 2.0.0
    • snapshots
    • None
    • Reviewed

    Description

      In SnapshotManager#restoreSnapshot, the table and region quota will be checked and updated as:

            try {
              // Table already exist. Check and update the region quota for this table namespace
              checkAndUpdateNamespaceRegionQuota(manifest, tableName);
              restoreSnapshot(snapshot, snapshotTableDesc);
            } catch (IOException e) {
              this.master.getMasterQuotaManager().removeTableFromNamespaceQuota(tableName);
              LOG.error("Exception occurred while restoring the snapshot " + snapshot.getName()
                  + " as table " + tableName.getNameAsString(), e);
              throw e;
            }
      

      The 'checkAndUpdateNamespaceRegionQuota' will fail if regions in the snapshot make the region count quota exceeded, then, the table will be removed in the 'catch' block. This will make the current table count and region count decrease, following table creation or region split will succeed even if the actual quota is exceeded.

      Attachments

        1. HBASE-15433-branch-1-v1.patch
          10 kB
          Jianwei Cui
        2. HBASE-15433-trunk.patch
          6 kB
          Jianwei Cui
        3. HBASE-15433-trunk-v1.patch
          6 kB
          Jianwei Cui
        4. HBASE-15433-trunk-v2.patch
          8 kB
          Jianwei Cui
        5. HBASE-15433-v3.patch
          10 kB
          Jianwei Cui
        6. HBASE-15433-v4.patch
          10 kB
          Jianwei Cui

        Activity

          People

            cuijianwei Jianwei Cui
            cuijianwei Jianwei Cui
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: