[
https://issues.apache.org/jira/browse/HBASE-20588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16481975#comment-16481975
]
Nihal Jain commented on HBASE-20588:
------------------------------------
Dropping a table containing a disable violation policy fails to remove the
quota upon table delete.
* When we drop a table, upon completion the quota triggers removal of disable
policy, thus causing the system to enable the table
{noformat}
2018-05-18 18:08:58,189 DEBUG [PEWorker-13]
procedure.DeleteTableProcedure(130): delete
'testSetQuotaAndThenDropTableWithDisable19' completed
2018-05-18 18:08:58,191 INFO [PEWorker-13] procedure2.ProcedureExecutor(1265):
Finished pid=328, state=SUCCESS; DeleteTableProcedure
table=testSetQuotaAndThenDropTableWithDisable19 in 271msec
2018-05-18 18:08:58,321 INFO [regionserver/ba4cba1aa13d:0.Chore.1]
client.HBaseAdmin$14(844): Started enable of
testSetQuotaAndThenDropTableWithDisable19{noformat}
* But, since the table has already been dropped, enable procedure would
rollback
{noformat}
2018-05-18 18:08:58,427 DEBUG
[RpcServer.default.FPBQ.Fifo.handler=2,queue=0,port=46443]
procedure2.ProcedureExecutor(884): Stored pid=329,
state=RUNNABLE:ENABLE_TABLE_PREPARE; EnableTableProcedure
table=testSetQuotaAndThenDropTableWithDisable19
2018-05-18 18:08:58,430 DEBUG
[RpcServer.default.FPBQ.Fifo.handler=2,queue=0,port=46443]
master.MasterRpcServices(1141): Checking to see if procedure is done pid=329
2018-05-18 18:08:58,451 INFO [PEWorker-10] procedure2.ProcedureExecutor(1359):
Rolled back pid=329, state=ROLLEDBACK,
exception=org.apache.hadoop.hbase.TableNotFoundException via
master-enable-table:org.apache.hadoop.hbase.TableNotFoundException:
testSetQuotaAndThenDropTableWithDisable19; EnableTableProcedure
table=testSetQuotaAndThenDropTableWithDisable19 exec-time=124msec
2018-05-18 18:08:58,533 DEBUG
[RpcServer.default.FPBQ.Fifo.handler=2,queue=0,port=46443]
master.MasterRpcServices(1141): Checking to see if procedure is done pid=329
2018-05-18 18:08:58,535 INFO [regionserver/ba4cba1aa13d:0.Chore.1]
client.HBaseAdmin$TableFuture(3652): Operation: ENABLE, Table Name:
default:testSetQuotaAndThenDropTableWithDisable19 failed with
testSetQuotaAndThenDropTableWithDisable19{noformat}
* Since, quota manager fails to enable table (i.e disable violation policy),
it would not remove the policy, causing problems if table re-created
{noformat}
2018-05-18 18:08:58,536 ERROR [regionserver/ba4cba1aa13d:0.Chore.1]
quotas.RegionServerSpaceQuotaManager(210): Failed to disable space violation
policy for testSetQuotaAndThenDropTableWithDisable19. This table will remain in
violation.
org.apache.hadoop.hbase.TableNotFoundException:
testSetQuotaAndThenDropTableWithDisable19
at
org.apache.hadoop.hbase.master.procedure.EnableTableProcedure.prepareEnable(EnableTableProcedure.java:323)
at
org.apache.hadoop.hbase.master.procedure.EnableTableProcedure.executeFromState(EnableTableProcedure.java:98)
at
org.apache.hadoop.hbase.master.procedure.EnableTableProcedure.executeFromState(EnableTableProcedure.java:49)
at
org.apache.hadoop.hbase.procedure2.StateMachineProcedure.execute(StateMachineProcedure.java:184)
at org.apache.hadoop.hbase.procedure2.Procedure.doExecute(Procedure.java:850)
at
org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execProcedure(ProcedureExecutor.java:1472)
at
org.apache.hadoop.hbase.procedure2.ProcedureExecutor.executeProcedure(ProcedureExecutor.java:1240)
at
org.apache.hadoop.hbase.procedure2.ProcedureExecutor.access$800(ProcedureExecutor.java:75)
at
org.apache.hadoop.hbase.procedure2.ProcedureExecutor$WorkerThread.run(ProcedureExecutor.java:1760){noformat}
Should I rasie another issue? This seems to be a completely different problem.
If yes, then should I submit a new patch without the concerned failing test
{{testSetQuotaAndThenDropTableWithDisable}}. This can be added to new issue.
> Space quota change after quota violation doesn't seem to take in effect
> -----------------------------------------------------------------------
>
> Key: HBASE-20588
> URL: https://issues.apache.org/jira/browse/HBASE-20588
> Project: HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 3.0.0, 2.0.0
> Reporter: Biju Nair
> Assignee: Nihal Jain
> Priority: Major
> Fix For: 3.0.0
>
> Attachments: HBASE-20588.master.001.patch,
> HBASE-20588.master.001.patch, HBASE-20588.master.002.patch
>
>
> Steps followed
> - Through {{hbase shell}}
> {noformat}
> set_quota TYPE => SPACE, TABLE => 'TestTable', LIMIT => '2M', POLICY =>
> NO_INSERTS{noformat}
> - Run {{PE}} until the quota is reached
> {noformat}
> hbase org.apache.hadoop.hbase.PerformanceEvaluation --nomapred
> --rows=20000000 sequentialWrite 1{noformat}
> - Through {{HBase}} shell
> {noformat}
> set_quota TYPE => SPACE, TABLE => 'TestTable', LIMIT => NONE{noformat}
> - Through {{HBase}} shell verify the effective Quotas
> {noformat}
> > list_quotas
> OWNER QUOTAS
>
>
> 0 row(s)
> Took 0.0365 seconds{noformat}
> - Wait for some time (at least 5 mins) and try to add data to the table
> {noformat}
> > put 'TestTable','r1','info0:0','v1'
> ERROR: org.apache.hadoop.hbase.quotas.SpaceLimitingException: NO_INSERTS Puts
> are disallowed due to a space quota.
> at
> org.apache.hadoop.hbase.quotas.policies.NoInsertsViolationPolicyEnforcement.check(NoInsertsViolationPolicyEnforcement.java:47){noformat}
> To resolve the issue, {{RSes}} need to be restarted which points to in memory
> data not getting reset.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)