You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2022/12/02 08:03:24 UTC
[iotdb] branch rel/1.0 updated: add more logs for snapshot (#8298)
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch rel/1.0
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/1.0 by this push:
new ff953d36c3 add more logs for snapshot (#8298)
ff953d36c3 is described below
commit ff953d36c3d8ba719ceedd5a8e2e5523f95cca30
Author: Beyyes <cg...@foxmail.com>
AuthorDate: Fri Dec 2 16:03:18 2022 +0800
add more logs for snapshot (#8298)
---
.../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) {