joshelser commented on a change in pull request #572: HBASE-22012 Space Quota: 
DisableTableViolationPolicy will cause cycles of enable/disable table
URL: https://github.com/apache/hbase/pull/572#discussion_r325829080
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/MasterQuotaManager.java
 ##########
 @@ -702,15 +703,53 @@ int pruneEntriesOlderThan(long timeToPruneBefore) {
     Iterator<Entry<RegionInfo,SizeSnapshotWithTimestamp>> iterator =
         regionSizes.entrySet().iterator();
     while (iterator.hasNext()) {
-      long currentEntryTime = iterator.next().getValue().getTime();
-      if (currentEntryTime < timeToPruneBefore) {
+      RegionInfo regionInfo = iterator.next().getKey();
+      long currentEntryTime = regionSizes.get(regionInfo).getTime();
+      boolean isInViolationAndPolicyDisable = 
isInViolationAndPolicyDisable(regionInfo.getTable());
+      // do not prune the entries if table is in violation and
+      // violation policy is disable.prune entries older than time.
 
 Review comment:
   Could you buff out this comment with an explanation as to why we need to 
hold onto `RegionSize`s for tables in violation with a disable policy _or_ 
include a reference to HBASE-22012, please?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to