New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-24774 Space Quota violation policy Disable does not work at nam… #2142
base: master
Are you sure you want to change the base?
Conversation
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@@ -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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
snapshotNotifier.transitionTable may throw IOE.
Do you want to enclose the call to snapshotNotifier.transitionTable in try / catch block so that the new code would always run ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The else block starting at line 418 is for targetStatus.isInViolation()
So if SpaceViolationPolicy.DISABLE is in effect, I think the table should be disabled.
We'd better keep quota table consistent with regard to the violation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that makes sense. I have updated the PR.
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
…espace level