You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/25 08:03:50 UTC

[GitHub] [incubator-doris] lide-reed commented on a diff in pull request #9011: [Enhancement] (image) check image validity as soon as generated

lide-reed commented on code in PR #9011:
URL: https://github.com/apache/incubator-doris/pull/9011#discussion_r857358212


##########
fe/fe-core/src/main/java/org/apache/doris/persist/MetaCleaner.java:
##########
@@ -67,6 +67,17 @@ public void clean() throws IOException {
             }
         }
     }
+
+    public void cleanTheLatestInvalidImageFile(String path) throws IOException {
+        File latestInvalidImage = new File(path);
+        if (latestInvalidImage.exists()) {
+            if (latestInvalidImage.delete()) {
+                LOG.info(latestInvalidImage.getAbsoluteFile() + " deleted.");
+            } else {
+                LOG.warn(latestInvalidImage.getAbsoluteFile() + " delete failed.");

Review Comment:
   Can it print the reason to the warning log if delete failed 



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org