You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2023/01/10 08:37:48 UTC
[GitHub] [ozone] sumitagrawl opened a new pull request, #4165: HDDS-7751. Volume quota must have all bucket quota set
sumitagrawl opened a new pull request, #4165:
URL: https://github.com/apache/ozone/pull/4165
## What changes were proposed in this pull request?
1. Revert changes HDDS-7652 as its mandatory that all bucket space quota is set if volume quota is set
2. Added check for volume when have set space quota, all bucket must have set space quota
3. Also check when bucket is created, its space quota must be present when volume space quota set
## What is the link to the Apache JIRA
[HDDS-7751](https://issues.apache.org/jira/browse/HDDS-7751)
## How was this patch tested?
Patch is tested with UT and E2E scenario
--
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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] ChenSammi commented on pull request #4165: HDDS-7751. Volume quota must have all bucket quota set
Posted by GitBox <gi...@apache.org>.
ChenSammi commented on PR #4165:
URL: https://github.com/apache/ozone/pull/4165#issuecomment-1378597181
The patch LGTM.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sadanand48 merged pull request #4165: HDDS-7751. Volume quota must have all bucket quota set
Posted by GitBox <gi...@apache.org>.
sadanand48 merged PR #4165:
URL: https://github.com/apache/ozone/pull/4165
--
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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sumitagrawl commented on pull request #4165: HDDS-7751. Volume quota must have all bucket quota set
Posted by GitBox <gi...@apache.org>.
sumitagrawl commented on PR #4165:
URL: https://github.com/apache/ozone/pull/4165#issuecomment-1376908662
@sadanand48 @ChenSammi Please review
--
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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sumitagrawl commented on a diff in pull request #4165: HDDS-7751. Volume quota must have all bucket quota set
Posted by GitBox <gi...@apache.org>.
sumitagrawl commented on code in PR #4165:
URL: https://github.com/apache/ozone/pull/4165#discussion_r1066638441
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/OMVolumeSetQuotaRequest.java:
##########
@@ -195,14 +195,24 @@ public boolean checkQuotaBytesValid(OMMetadataManager metadataManager,
return false;
}
+ boolean isBucketQuotaSet = true;
List<OmBucketInfo> bucketList = metadataManager.listBuckets(
volumeName, null, null, Integer.MAX_VALUE);
for (OmBucketInfo bucketInfo : bucketList) {
long nextQuotaInBytes = bucketInfo.getQuotaInBytes();
if (nextQuotaInBytes > OzoneConsts.QUOTA_RESET) {
totalBucketQuota += nextQuotaInBytes;
+ } else {
+ isBucketQuotaSet = false;
Review Comment:
done
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/OMVolumeSetQuotaRequest.java:
##########
@@ -195,14 +195,24 @@ public boolean checkQuotaBytesValid(OMMetadataManager metadataManager,
return false;
}
+ boolean isBucketQuotaSet = true;
List<OmBucketInfo> bucketList = metadataManager.listBuckets(
volumeName, null, null, Integer.MAX_VALUE);
for (OmBucketInfo bucketInfo : bucketList) {
long nextQuotaInBytes = bucketInfo.getQuotaInBytes();
if (nextQuotaInBytes > OzoneConsts.QUOTA_RESET) {
totalBucketQuota += nextQuotaInBytes;
+ } else {
+ isBucketQuotaSet = false;
}
}
+
+ if (!isBucketQuotaSet) {
+ throw new OMException("Can not set volume quota as some of bucket " +
Review Comment:
updated
--
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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sadanand48 commented on pull request #4165: HDDS-7751. Volume quota must have all bucket quota set
Posted by GitBox <gi...@apache.org>.
sadanand48 commented on PR #4165:
URL: https://github.com/apache/ozone/pull/4165#issuecomment-1378415367
LGTM, the acceptance test failures look related though.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sadanand48 commented on a diff in pull request #4165: HDDS-7751. Volume quota must have all bucket quota set
Posted by GitBox <gi...@apache.org>.
sadanand48 commented on code in PR #4165:
URL: https://github.com/apache/ozone/pull/4165#discussion_r1065624546
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/OMVolumeSetQuotaRequest.java:
##########
@@ -195,14 +195,24 @@ public boolean checkQuotaBytesValid(OMMetadataManager metadataManager,
return false;
}
+ boolean isBucketQuotaSet = true;
List<OmBucketInfo> bucketList = metadataManager.listBuckets(
volumeName, null, null, Integer.MAX_VALUE);
for (OmBucketInfo bucketInfo : bucketList) {
long nextQuotaInBytes = bucketInfo.getQuotaInBytes();
if (nextQuotaInBytes > OzoneConsts.QUOTA_RESET) {
totalBucketQuota += nextQuotaInBytes;
+ } else {
+ isBucketQuotaSet = false;
Review Comment:
Can put a break statement here to optimize
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketCreateRequest.java:
##########
@@ -388,6 +388,15 @@ public boolean checkQuotaBytesValid(OMMetadataManager metadataManager,
long quotaInBytes = omBucketInfo.getQuotaInBytes();
long volumeQuotaInBytes = omVolumeArgs.getQuotaInBytes();
+ // When volume quota is set, then its mandatory to have bucket quota
+ if (volumeQuotaInBytes > 0) {
+ if (quotaInBytes <= 0) {
Review Comment:
Can we specify the quota parameter during bucket creation? If not it might fail.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/OMVolumeSetQuotaRequest.java:
##########
@@ -195,14 +195,24 @@ public boolean checkQuotaBytesValid(OMMetadataManager metadataManager,
return false;
}
+ boolean isBucketQuotaSet = true;
List<OmBucketInfo> bucketList = metadataManager.listBuckets(
volumeName, null, null, Integer.MAX_VALUE);
for (OmBucketInfo bucketInfo : bucketList) {
long nextQuotaInBytes = bucketInfo.getQuotaInBytes();
if (nextQuotaInBytes > OzoneConsts.QUOTA_RESET) {
totalBucketQuota += nextQuotaInBytes;
+ } else {
+ isBucketQuotaSet = false;
}
}
+
+ if (!isBucketQuotaSet) {
+ throw new OMException("Can not set volume quota as some of bucket " +
Review Comment:
how about "Cannot set volume quota on volume {volumeName} as some of the buckets in this volume have no quota set"
--
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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sumitagrawl commented on a diff in pull request #4165: HDDS-7751. Volume quota must have all bucket quota set
Posted by GitBox <gi...@apache.org>.
sumitagrawl commented on code in PR #4165:
URL: https://github.com/apache/ozone/pull/4165#discussion_r1066607039
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketCreateRequest.java:
##########
@@ -388,6 +388,15 @@ public boolean checkQuotaBytesValid(OMMetadataManager metadataManager,
long quotaInBytes = omBucketInfo.getQuotaInBytes();
long volumeQuotaInBytes = omVolumeArgs.getQuotaInBytes();
+ // When volume quota is set, then its mandatory to have bucket quota
+ if (volumeQuotaInBytes > 0) {
+ if (quotaInBytes <= 0) {
Review Comment:
Yes, we can specify bucket quota parameter while create bucket.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org