slfan1989 opened a new pull request, #10291: URL: https://github.com/apache/ozone/pull/10291
## What changes were proposed in this pull request? This PR makes DN fail unreferenced block deletion when chunk listing or file deletion fails. During unreferenced block cleanup, `KeyValueHandler.deleteUnreferenced` previously assumed that the chunk directory listing always succeeded and did not check the return value of `FileUtil.fullyDelete`. As a result, DN could log an unreferenced chunk/block as deleted even when the file was not actually removed from disk. This change makes the cleanup path fail explicitly when: * the chunk directory cannot be listed; * an unreferenced chunk/block file cannot be deleted. The success log is emitted only after the file deletion succeeds. This avoids silently treating failed cleanup as successful and makes the failure visible to callers/logs. ## What is the link to the Apache JIRA JIRA: HDDS-15291. DN should fail unreferenced block deletion on file errors. ## How was this patch tested? Add Junit Test. https://github.com/slfan1989/ozone/actions/runs/25953412303 -- 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]
