[ 
https://issues.apache.org/jira/browse/HBASE-20820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nihal Jain updated HBASE-20820:
-------------------------------
    Description: 
As demonstarted in *HBASE-20662.master.002.patch* setting quota on a namespace 
and removing it does not remove the quota setting from the tables in the 
namespace (which were added systematically due to namespace quota settings).

*Steps:*
 * Create a namespace and a table in it
 * Set space quota on namespace
 * Violate namespace space quota
 * Remove space quota on namespace
 * Put row in table contained in namespace

{code:java}
public void setQuotaAndThenRemove(final String namespace, SpaceViolationPolicy 
policy)
    throws Exception {
  Put put = new Put(Bytes.toBytes("to_reject"));
  put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), Bytes.toBytes("to"),
    Bytes.toBytes("reject"));
  // Set quota and do puts until we violate space policy
  final TableName tn = writeUntilNSSpaceViolationAndVerifyViolation(namespace, 
policy, put);
  // Now, remove the quota
  removeQuotaFromNamespace(namespace);
  // Put some rows now: should not violate as quota settings removed
  verifyNoViolation(policy, tn, put);
}
{code}
*Expected*: We should be able to put data in contained table
 *Actual*: We are not able to put data as SpaceQuota settings (systematically 
created due to previously added namespace space quota) exist on table

  was:
As demonstarted in 
[HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
 setting quota on a namespace and removing it does not remove the quota setting 
from the tables in the namespace (which were added systematically due to 
namespace quota settings).

*Relevant code:*
{code:java}
public void setQuotaAndThenRemove(final String namespace, SpaceViolationPolicy 
policy)
    throws Exception {
  Put put = new Put(Bytes.toBytes("to_reject"));
  put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), Bytes.toBytes("to"),
    Bytes.toBytes("reject"));
  // Set quota and do puts until we violate space policy
  final TableName tn = writeUntilNSSpaceViolationAndVerifyViolation(namespace, 
policy, put);
  // Now, remove the quota
  removeQuotaFromNamespace(namespace);
  // Put some rows now: should not violate as quota settings removed
  verifyNoViolation(policy, tn, put);
}
{code}


> Removing SpaceQuota from a namespace does not remove it completely
> ------------------------------------------------------------------
>
>                 Key: HBASE-20820
>                 URL: https://issues.apache.org/jira/browse/HBASE-20820
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Nihal Jain
>            Assignee: Nihal Jain
>            Priority: Major
>
> As demonstarted in *HBASE-20662.master.002.patch* setting quota on a 
> namespace and removing it does not remove the quota setting from the tables 
> in the namespace (which were added systematically due to namespace quota 
> settings).
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace space quota
>  * Remove space quota on namespace
>  * Put row in table contained in namespace
> {code:java}
> public void setQuotaAndThenRemove(final String namespace, 
> SpaceViolationPolicy policy)
>     throws Exception {
>   Put put = new Put(Bytes.toBytes("to_reject"));
>   put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), 
> Bytes.toBytes("to"),
>     Bytes.toBytes("reject"));
>   // Set quota and do puts until we violate space policy
>   final TableName tn = 
> writeUntilNSSpaceViolationAndVerifyViolation(namespace, policy, put);
>   // Now, remove the quota
>   removeQuotaFromNamespace(namespace);
>   // Put some rows now: should not violate as quota settings removed
>   verifyNoViolation(policy, tn, put);
> }
> {code}
> *Expected*: We should be able to put data in contained table
>  *Actual*: We are not able to put data as SpaceQuota settings (systematically 
> created due to previously added namespace space quota) exist on table



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to