HDDS-4277. Support Bucket Namespace Quota Updates#1706
HDDS-4277. Support Bucket Namespace Quota Updates#1706captainzmc merged 9 commits intoapache:masterfrom
Conversation
linyiqun
left a comment
There was a problem hiding this comment.
Most of change looks good to me. Some minor comments frome.
There was a problem hiding this comment.
countException is not actually needed, we could add fail() after writeKey and ensure this exception should be happened.
try {
writeKey(bucket, key3, ONE, value, value.length());
Assert.fail("Write key should be failed")
} catch (IOException ex) {There was a problem hiding this comment.
This comment should be updated
There was a problem hiding this comment.
We should move checkBucketQuotaInNamespace check after checkBucketQuotaInBytes. Here we add cache entry before quota check, this will lead the dirty data.
|
@captainzmc @linyiqun comments addressed. Can you take a another look please? |
linyiqun
left a comment
There was a problem hiding this comment.
Catch one nit below, +1 for others.
@captainzmc, please help do the double check for this PR, thanks.
There was a problem hiding this comment.
Nit: usedBytes -> usedNamespace
captainzmc
left a comment
There was a problem hiding this comment.
@amaliujia Thanks for the patch. I left two comments, we can discuss if there are any questions.
There was a problem hiding this comment.
If the key is created successfully, but write failed before the commit key (for example, client crashes), then the key should not be counted.
We'd better incrUsedNamespace(-1L), when we clean up this key in the background.
There was a problem hiding this comment.
I see.
Do you know where is the place that does such failed key cleanup?
There was a problem hiding this comment.
@captainzmc do you have an idea how does the background cleanup happen on keys that failed to commit?
There was a problem hiding this comment.
Got it. Have filed a jira to track it: https://issues.apache.org/jira/browse/HDDS-4620
...p-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java
Outdated
Show resolved
Hide resolved
|
Comments have addressed and CI has passed. |
captainzmc
left a comment
There was a problem hiding this comment.
+1 LGTM. If no one else has a new comment, I will merge this tomorrow.
…en create and delete key in a bucket
|
Merged this. Thanks for @amaliujia's patch, and thanks for the review of @linyiqun |
What changes were proposed in this pull request?
add namespaceQuotaUsage and update it when create and delete key in a bucket
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-4277
How was this patch tested?
UT