sumitagrawl commented on code in PR #7377:
URL: https://github.com/apache/ozone/pull/7377#discussion_r1888668281
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyDeletingService.java:
##########
@@ -220,8 +225,15 @@ public BackgroundTaskResult call() {
if (keyBlocksList != null && !keyBlocksList.isEmpty()) {
delCount = processKeyDeletes(keyBlocksList,
getOzoneManager().getKeyManager(),
- pendingKeysDeletion.getKeysToModify(), null,
expectedPreviousSnapshotId);
+ pendingKeysDeletion.getKeysToModify(), null,
expectedPreviousSnapshotId, true);
deletedKeyCount.addAndGet(delCount);
+ metrics.setIterationKeyRunCount(run);
+ metrics.setIterationKeyStartTime(startTime);
+ metrics.setIterationKeyDuration(Time.monotonicNow() - startTime);
+ metrics.setIterationKeysProcessed(keyBlocksList.size());
+ metrics.setIterationKeysSentForPurge(delCount);
+ metrics.incrNumKeysProcessed(keyBlocksList.size());
Review Comment:
Same as above, Considering this, NumKeysProcessed and NumKeysSentForPurge is
same, so we do not need keep 2 metrics, can have only one, better
deletedKeyCount can be moved to Metrics representing same data.
--
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]