You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ca...@apache.org on 2022/12/02 03:32:50 UTC

[iotdb] branch fix_snapshot_comment created (now f1f8053fab)

This is an automated email from the ASF dual-hosted git repository.

caogaofei pushed a change to branch fix_snapshot_comment
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at f1f8053fab add more logs for snapshot

This branch includes the following new commits:

     new f1f8053fab add more logs for snapshot

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: add more logs for snapshot

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

caogaofei pushed a commit to branch fix_snapshot_comment
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit f1f8053fab2acef107f5a91cae4b2fe59730e235
Author: Beyyes <cg...@foxmail.com>
AuthorDate: Fri Dec 2 11:32:35 2022 +0800

    add more logs for snapshot
---
 .../confignode/persistence/executor/ConfigPlanExecutor.java  | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/persistence/executor/ConfigPlanExecutor.java b/confignode/src/main/java/org/apache/iotdb/confignode/persistence/executor/ConfigPlanExecutor.java
index 3c5e35f655..70a85fa24e 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/persistence/executor/ConfigPlanExecutor.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/persistence/executor/ConfigPlanExecutor.java
@@ -405,7 +405,7 @@ public class ConfigPlanExecutor {
               try {
                 takeSnapshotResult = x.processTakeSnapshot(snapshotDir);
               } catch (TException | IOException e) {
-                LOGGER.error(e.getMessage());
+                LOGGER.error("Take snapshot error: {}", e.getMessage());
                 takeSnapshotResult = false;
               } finally {
                 // If any snapshot fails, the whole fails
@@ -415,6 +415,9 @@ public class ConfigPlanExecutor {
                 }
               }
             });
+    if (result.get()) {
+      LOGGER.info("Task snapshot success, snapshotDir: {}", snapshotDir);
+    }
     return result.get();
   }
 
@@ -426,6 +429,7 @@ public class ConfigPlanExecutor {
       return;
     }
 
+    AtomicBoolean result = new AtomicBoolean(true);
     snapshotProcessorList
         .parallelStream()
         .forEach(
@@ -433,9 +437,13 @@ public class ConfigPlanExecutor {
               try {
                 x.processLoadSnapshot(latestSnapshotRootDir);
               } catch (TException | IOException e) {
-                LOGGER.error(e.getMessage());
+                result.set(false);
+                LOGGER.error("Load snapshot error: {}", e.getMessage());
               }
             });
+    if (result.get()) {
+      LOGGER.info("Load snapshot success, latestSnapshotRootDir: {}", latestSnapshotRootDir);
+    }
   }
 
   private DataSet getSchemaNodeManagementPartition(ConfigPhysicalPlan req) {