Copilot commented on code in PR #8939:
URL: https://github.com/apache/ozone/pull/8939#discussion_r2283047253


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/snapshot/OMSnapshotPurgeResponse.java:
##########
@@ -125,11 +127,14 @@ private void deleteCheckpointDirectory(OMMetadataManager 
omMetadataManager,
     boolean acquiredSnapshotLock = omLockDetails.isLockAcquired();
     if (acquiredSnapshotLock) {
       Path snapshotDirPath = 
OmSnapshotManager.getSnapshotPath(omMetadataManager, snapshotInfo);
+      Path snapshotLocalDataPath = Paths.get(
+          
OmSnapshotManager.getSnapshotLocalPropertyYamlPath(omMetadataManager, 
snapshotInfo));
       try {
         FileUtils.deleteDirectory(snapshotDirPath.toFile());
+        Files.deleteIfExists(snapshotLocalDataPath);

Review Comment:
   The YAML file deletion should be included in the same try-catch block as the 
directory deletion to ensure consistent error handling and logging for both 
operations.



-- 
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]

Reply via email to