You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/09/21 12:20:07 UTC

[GitHub] [hbase] shardul-cr7 commented on a change in pull request #572: HBASE-22012 Space Quota: DisableTableViolationPolicy will cause cycles of enable/disable table

shardul-cr7 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_r326858195
 
 

 ##########
 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:
   done

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services