meethngala commented on code in PR #3687:
URL: https://github.com/apache/gobblin/pull/3687#discussion_r1204616456


##########
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/retention/version/HiveDatasetVersionCleaner.java:
##########
@@ -88,20 +88,24 @@ public void clean() throws IOException {
       Partition partition = hiveDatasetVersion.getPartition();
       try {
         if (!cleanableHiveDataset.isSimulate()) {
+          if (cleanableHiveDataset.isShouldDeleteData()) {
+            
cleanableHiveDataset.getFsCleanableHelper().clean(hiveDatasetVersion, 
possiblyEmptyDirectories);

Review Comment:
   I see the concern here. It always fetches the paths to be deleted from the 
`FileSystemDatasetVersion`. This can be confirmed with this line: `Set<Path> 
pathsToDelete = versionToDelete.getPaths();`. Thus, the set should be empty if 
we try to fetch paths that don't exist. However, upon re-run, we can also set 
the flag `isShouldDeleteData` to `false` which will not try to delete it again. 



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

Reply via email to