Copilot commented on code in PR #8587:
URL: https://github.com/apache/ozone/pull/8587#discussion_r2358207670
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/response/key/TestOMKeyDeleteResponse.java:
##########
@@ -115,7 +115,7 @@ public void testAddToDBBatchWithNonEmptyBlocks() throws
Exception {
// Do manual commit and see whether addToBatch is successful or not.
omMetadataManager.getStore().commitBatchOperation(batchOperation);
-
+ System.out.println(ozoneKey + " " + ozoneKey.length());
Review Comment:
Debug print statement should be removed from production code
```suggestion
```
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketInfo.java:
##########
@@ -723,6 +800,8 @@ public String toString() {
", metadata=" + getMetadata() +
", usedBytes=" + usedBytes +
", usedNamespace=" + usedNamespace +
+ ", snapshotUsedBytes=" + snapshotUsedBytes +
+ ", snapshotUsedBytes=" + snapshotUsedNamespace +
Review Comment:
The label 'snapshotUsedBytes' should display snapshotUsedBytes value, not
snapshotUsedNamespace
```suggestion
", snapshotUsedNamespace=" + snapshotUsedNamespace +
```
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/QuotaRepairTask.java:
##########
@@ -255,8 +255,8 @@ private static void populateBucket(
String bucketNameKey = buildNamePath(bucketInfo.getVolumeName(),
bucketInfo.getBucketName());
oriBucketInfoMap.put(bucketNameKey, bucketInfo.copyObject());
- bucketInfo.incrUsedNamespace(-bucketInfo.getUsedNamespace());
- bucketInfo.incrUsedBytes(-bucketInfo.getUsedBytes());
+ bucketInfo.decrUsedBytes(bucketInfo.getUsedNamespace(), false);
+ bucketInfo.decrUsedNamespace(bucketInfo.getUsedBytes(), false);
Review Comment:
The parameters are swapped - decrUsedBytes should use getUsedBytes() and
decrUsedNamespace should use getUsedNamespace()
```suggestion
bucketInfo.decrUsedBytes(bucketInfo.getUsedBytes(), false);
bucketInfo.decrUsedNamespace(bucketInfo.getUsedNamespace(), false);
```
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/key/OMKeyDeleteResponseWithFSO.java:
##########
@@ -100,8 +101,9 @@ public void addToDBBatch(OMMetadataManager
omMetadataManager,
omKeyInfo.getKeyName());
deletedKey = omMetadataManager.getOzoneDeletePathKey(
omKeyInfo.getObjectID(), deletedKey);
+ LOG.info("Delete key : {} ", ozoneDbKey);
Review Comment:
Debug log statement should be removed or changed to DEBUG level to avoid
excessive logging in production
```suggestion
LOG.debug("Delete key : {} ", ozoneDbKey);
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]