errose28 commented on code in PR #7314:
URL: https://github.com/apache/ozone/pull/7314#discussion_r1854451868
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/AbstractKeyDeletingService.java:
##########
@@ -449,13 +453,21 @@ public long optimizeDirDeletesAndSubmitRequest(long
remainNum,
deletedDirsCount.addAndGet(dirNum + subdirDelNum);
movedDirsCount.addAndGet(subDirNum - subdirDelNum);
movedFilesCount.addAndGet(subFileNum);
+ long timeTakenInIteration = Time.monotonicNow() - startTime;
LOG.info("Number of dirs deleted: {}, Number of sub-dir " +
"deleted: {}, Number of sub-files moved:" +
" {} to DeletedTable, Number of sub-dirs moved {} to " +
- "DeletedDirectoryTable, iteration elapsed: {}ms," +
+ "DeletedDirectoryTable, limit per iteration: {}, iteration
elapsed: {}ms, " +
" totalRunCount: {}",
- dirNum, subdirDelNum, subFileNum, (subDirNum - subdirDelNum),
- Time.monotonicNow() - startTime, getRunCount());
+ dirNum, subdirDelNum, subFileNum, (subDirNum - subdirDelNum), limit,
+ timeTakenInIteration, getRunCount());
+ if (remainNum <= 0) {
+ LOG.warn("Limit for no. of directory+files that can be deleted in one
iteration is reached. " +
+ "Current limit: {} = {}",
+ OMConfigKeys.OZONE_PATH_DELETING_LIMIT_PER_TASK,
ozoneManager.getConfiguration()
+ .getInt(OMConfigKeys.OZONE_PATH_DELETING_LIMIT_PER_TASK,
+ OMConfigKeys.OZONE_PATH_DELETING_LIMIT_PER_TASK_DEFAULT));
+ }
Review Comment:
The number of log lines won't change, it will be one per iteration
regardless of the conditions. We should definitely warn if it is taking longer
than the interval. As for the key count limits being hit, it could go either
way. One option is we could leave that condition at info for now, and as a
follow up we could optionally save the state of the last few runs and only log
a warning if the last 10 or so hit the key limits.
--
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]