skochhar commented on pull request #1935: URL: https://github.com/apache/hbase/pull/1935#issuecomment-656875501
> > My change removes these QUOTA_FAMILY_USAGE column family for the tables when a namespace quota is deleted and allows the user to insert into the tables in the namespace when the violated space quota is removed. > > > But I thought you should fix the problem not in QuotaUtil class, maybe in MasterQuotaManager? Keep QuotaUtil simple and fix this in upper layer. > > Thanks for the explanation in [#1935 (review)](https://github.com/apache/hbase/pull/1935#pullrequestreview-439900394), Surbhi. This helps tremendously. > > I'm not sure that removing the `u:p` cell is the correct solution. These columns are just tracking the _size_ of the table. In themselves, they aren't controlling anything (if memory serves). Instead, we should know that when we delete the NamespaceQuota, MasterQuotaManager needs to become aware of this (somehow) and remove any SpaceQuotaViolationPolicies that are in effect. > > I suspect your fix does work, but for the wrong reason. If you remove the sizes for these tables, the Master will simply think that the table is no longer in validation. If you have a table-level quota also defined (like I commented in-code), I think this change will incorrectly cause that table-level to not be applied. Thanks Josh, I tested that my fix does not remove any table-level quotas. If a namespace "test" has 2 tables "test:table1" and "test:table2". And namespace "test" has a space quota on it and the "test.table1" also has a table-quota on it so you see 4 rows in quota table, the row for the namespace quota, the row for the table quota and the usage rows for the tables under the namespace. Showing you below scan of hbase:quota table with a namespace "test" and table "test:table1" that has the space quota hbase(main):015:0> scan 'hbase:quota' ROW COLUMN+CELL n.test column=q:s, timestamp=1591306396362, value=PBUF\x1A\x07\x08\.. t.test:table1 column=q:s, timestamp=1591274418036, value=PBUF\x1A\x07\x08\.. t.test:table1 column=u:p, timestamp=1591306447760, value=\x0A\x04\x08\.. t.test:table2 column=u:p, timestamp=1591306447758, value=\x0A\x04\x08.. hbase(main):018:0> list_quotas OWNER QUOTAS NAMESPACE => test TYPE => SPACE, NAMESPACE => test, LIMIT => 2.00M, VIOLATION_POLICY => NO_INSERTS TABLE => test:table1 TYPE => SPACE, TABLE => test:table1, LIMIT => 30.00M, VIOLATION_POLICY => NO_INSERTS 2 row(s) My fix only removes the column family QUOTA_FAMILY_USAGE(u:p here) for the table and the QUOTA_FAMILY_INFO(q:s here) stay with my fix, so the table-quotas still get applied once the namespace quota is removed. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
