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

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


The following commit(s) were added to refs/heads/accelerate_recovery by this 
push:
     new 4d844a4a854 Execute flush before stop datanode
4d844a4a854 is described below

commit 4d844a4a854506ff6747298e2ea709d753d675fc
Author: HTHou <[email protected]>
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

Reply via email to