Copilot commented on code in PR #10291:
URL: https://github.com/apache/ozone/pull/10291#discussion_r3400510632
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -2073,12 +2078,20 @@ public void deleteUnreferenced(Container container,
long localID)
if (!file.isFile()) {
continue;
}
- FileUtil.fullyDelete(file);
+ if (!deleteUnreferencedFile(file)) {
+ throw new IOException("Failed to delete unreferenced chunk/block "
+ + file + " in container " + containerID);
+ }
Review Comment:
The deletion failure exception message omits the local block ID (`localID`),
which makes it harder to correlate the error back to the original unreferenced
block deletion request (especially for FILE_PER_CHUNK where multiple files may
exist per localID). Including `localID` would improve diagnosability.
--
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]