sanjeetnishad95 commented on a change in pull request #2142:
URL: https://github.com/apache/hbase/pull/2142#discussion_r461817088



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaObserverChore.java
##########
@@ -433,6 +433,11 @@ void updateNamespaceQuota(
             LOG.info(tableInNS + " moving into violation of namespace space 
quota with policy "
                 + targetStatus.getPolicy());
             this.snapshotNotifier.transitionTable(tableInNS, targetSnapshot);
+            // when the Namespace is in violation due to Disable Policy, 
Disable the table
+            if (targetStatus.isInViolation()

Review comment:
       hi @tedyu yes I can enclose it in a try/catch but I have a small 
question. If the `snapshotNotifier.transitionTable` failed with an exception 
and if it is caught and the table is disabled, wouldn't there be inconsistency 
as the quota table will still show the table as non-violated(wrong usage and 
limit) but at the same time the table will be disabled because of Quota 
violation?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaObserverChore.java
##########
@@ -433,6 +433,11 @@ void updateNamespaceQuota(
             LOG.info(tableInNS + " moving into violation of namespace space 
quota with policy "
                 + targetStatus.getPolicy());
             this.snapshotNotifier.transitionTable(tableInNS, targetSnapshot);
+            // when the Namespace is in violation due to Disable Policy, 
Disable the table
+            if (targetStatus.isInViolation()

Review comment:
       Yes, that makes sense. I have updated the PR.




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


Reply via email to