You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jianwei Cui (JIRA)" <ji...@apache.org> on 2016/03/09 12:44:40 UTC

[jira] [Created] (HBASE-15433) SnapshotManager#restoreSnapshot not update table and region count quota correctly when encountering exception

Jianwei Cui created HBASE-15433:
-----------------------------------

             Summary: SnapshotManager#restoreSnapshot not update table and region count quota correctly when encountering exception
                 Key: HBASE-15433
                 URL: https://issues.apache.org/jira/browse/HBASE-15433
             Project: HBase
          Issue Type: Bug
          Components: snapshots
    Affects Versions: 2.0.0
            Reporter: Jianwei Cui


In SnapshotManager#restoreSnapshot, the table and region quota will be checked and updated as:
{code}
      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;
      }
{code}
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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)