You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "XComp (via GitHub)" <gi...@apache.org> on 2023/03/09 10:26:50 UTC

[GitHub] [flink] XComp commented on a diff in pull request #21673: [FLINK-30513] Cleanup HA storage path on cluster termination

XComp commented on code in PR #21673:
URL: https://github.com/apache/flink/pull/21673#discussion_r1130781417


##########
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/AbstractHaServices.java:
##########
@@ -225,6 +237,13 @@ public CompletableFuture<Void> globalCleanupAsync(JobID jobID, Executor executor
                 executor);
     }
 
+    protected void cleanupClusterHaStoragePath() throws Exception {
+        final Path clusterHaStoragePath =
+                HighAvailabilityServicesUtils.getClusterHighAvailableStoragePath(configuration);
+        final FileSystem fileSystem = clusterHaStoragePath.getFileSystem();
+        fileSystem.delete(clusterHaStoragePath, true);

Review Comment:
   @dmvk noticed that this might break the JobResultStore if [job-result-store.delete-on-commit](https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/config/#job-result-store-delete-on-commit) is disabled but the default JobResultStore directory is not overridden (see [job-result-store.storage-path](https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/config/#job-result-store-storage-path)). The default path relies on [high-availability.storageDir](https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/config/#high-availability-storagedir) which we use here to delete all artifacts in this directory.



-- 
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@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org