You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/05/05 09:06:29 UTC

[GitHub] [iotdb] jamber001 commented on a diff in pull request #5800: [IOTDB-3016] do flush when graceful stop IoTDB

jamber001 commented on code in PR #5800:
URL: https://github.com/apache/iotdb/pull/5800#discussion_r865700391


##########
server/src/main/java/org/apache/iotdb/db/service/IoTDBShutdownHook.java:
##########
@@ -33,6 +35,11 @@ public void run() {
     CompactionTaskManager.getInstance().stop();
     // close rocksdb if possible to avoid lose data
     IoTDB.configManager.clear();
+
+    // == flush data to Tsfile and remove WAL log files
+    StorageEngine.getInstance().syncCloseAllProcessor();
+    WALManager.getInstance().deleteOutdatedWALFiles();

Review Comment:
   Current codes changes have been tested. It can work well.
   
   Now, I am not sure whether calling IoTDB#stop() will bring other issue. I will test it at once. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org