SWJTU-ZhangLei commented on code in PR #34645:
URL: https://github.com/apache/doris/pull/34645#discussion_r1654741911


##########
fe/fe-core/src/main/java/org/apache/doris/master/Checkpoint.java:
##########
@@ -148,7 +148,15 @@ public synchronized void doCheckpoint() throws 
CheckpointException {
             // If failed, just return
             env = Env.getCurrentEnv();
             createStaticFieldForCkpt();
-            env.loadImage(imageDir);
+            try {
+                env.loadImage(imageDir);
+            } catch (Throwable e) {
+                LOG.error("Exception when check image validity", e);
+                if (MetricRepo.isInit) {
+                    MetricRepo.COUNTER_IMAGE_WRITE_INVALIDITY.increase(1L);
+                }
+                throw e;
+            }

Review Comment:
   There is already a metric named `COUNTER_IMAGE_WRITE_FAILED`,why add another 
named `COUNTER_IMAGE_WRITE_INVALIDITY`



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