You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "SaketaChalamchala (via GitHub)" <gi...@apache.org> on 2026/07/21 00:23:39 UTC
Re: [PR] HDDS-13173. Clean up temporary checkpoint directories on snapshot defrag failure [ozone]
SaketaChalamchala commented on code in PR #10774:
URL: https://github.com/apache/ozone/pull/10774#discussion_r3618483236
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/defrag/SnapshotDefragService.java:
##########
@@ -723,7 +730,24 @@ boolean checkAndDefragSnapshot(SnapshotChainManager chainManager, UUID snapshotI
}
} finally {
if (checkpointMetadataManager != null) {
- checkpointMetadataManager.close();
+ try {
+ checkpointMetadataManager.close();
+ } catch (IOException closeException) {
+ LOG.error("Failed to close checkpoint metadata manager for snapshot: {} (ID: {})",
+ snapshotInfo.getTableKey(), snapshotInfo.getSnapshotId(), closeException);
+ }
+ }
+ if (defragSuccessful && checkpointLocation.toFile().exists()) {
Review Comment:
Thanks for the patch @cchung100m. Shouldn't this be `!defragSuccessful `?
```suggestion
if (!defragSuccessful && checkpointLocation.toFile().exists()) {
```
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org