You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2023/10/30 09:09:17 UTC
(iotdb) 02/06: Execute flush before stop datanode
This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a commit to branch speed_up_restart_recover
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit b8431e3b67925d23e89fa1ebbe717ca76a460b7c
Author: HTHou <hh...@outlook.com>
AuthorDate: Thu Oct 26 18:23:59 2023 +0800
Execute flush before stop datanode
---
.../main/java/org/apache/iotdb/db/service/IoTDBShutdownHook.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/IoTDBShutdownHook.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/IoTDBShutdownHook.java
index 5c67d8d9be4..ad13ff320b9 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/IoTDBShutdownHook.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/IoTDBShutdownHook.java
@@ -68,7 +68,12 @@ public class IoTDBShutdownHook extends Thread {
WALManager.getInstance().waitAllWALFlushed();
// flush data to Tsfile and remove WAL log files
- StorageEngine.getInstance().syncCloseAllProcessor();
+ if (!IoTDBDescriptor.getInstance()
+ .getConfig()
+ .getDataRegionConsensusProtocolClass()
+ .equals(ConsensusFactory.RATIS_CONSENSUS)) {
+ StorageEngine.getInstance().syncCloseAllProcessor();
+ }
WALManager.getInstance().deleteOutdatedWALFiles();
// We did this work because the RatisConsensus recovery mechanism is different from other