You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by yo...@apache.org on 2023/06/15 09:01:36 UTC

[iotdb] 01/02: add snapshot consume log

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

yongzao pushed a commit to branch test-snapshot-consume
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit e1d814fbc7acf990036ad2e875378d2456a0fe4c
Author: YongzaoDan <53...@qq.com>
AuthorDate: Thu Jun 15 13:40:07 2023 +0800

    add snapshot consume log
---
 .../iotdb/confignode/persistence/executor/ConfigPlanExecutor.java   | 6 ++++++
 1 file changed, 6 insertions(+)

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 e33c0ec0145..0aa2f9ab138 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
@@ -512,7 +512,13 @@ public class ConfigPlanExecutor {
         .forEach(
             x -> {
               try {
+                long startTime = System.currentTimeMillis();
+                LOGGER.info("[LoadSnapshot] Start to load snapshot for {}", x.getClass().getName());
                 x.processLoadSnapshot(latestSnapshotRootDir);
+                LOGGER.info(
+                    "[LoadSnapshot] Load snapshot for {} cost {} ms",
+                    x.getClass().getName(),
+                    System.currentTimeMillis() - startTime);
               } catch (TException | IOException e) {
                 result.set(false);
                 LOGGER.error("Load snapshot error: {}", e.getMessage());