You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2023/01/04 04:17:50 UTC

[iotdb] branch log_re1 created (now eae7fc5f4e)

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

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


      at eae7fc5f4e [IOTDB-5346] Fix log error in MemtableFlushTask when recovering (#8724)

This branch includes the following new commits:

     new eae7fc5f4e [IOTDB-5346] Fix log error in MemtableFlushTask when recovering (#8724)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: [IOTDB-5346] Fix log error in MemtableFlushTask when recovering (#8724)

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit eae7fc5f4ecc6485b45e6ad8b6375747164bd87b
Author: Haonan <hh...@outlook.com>
AuthorDate: Wed Jan 4 11:25:28 2023 +0800

    [IOTDB-5346] Fix log error in MemtableFlushTask when recovering (#8724)
---
 .../db/wal/recover/file/UnsealedTsFileRecoverPerformer.java    | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/wal/recover/file/UnsealedTsFileRecoverPerformer.java b/server/src/main/java/org/apache/iotdb/db/wal/recover/file/UnsealedTsFileRecoverPerformer.java
index 7768aee8d2..0fd8940839 100644
--- a/server/src/main/java/org/apache/iotdb/db/wal/recover/file/UnsealedTsFileRecoverPerformer.java
+++ b/server/src/main/java/org/apache/iotdb/db/wal/recover/file/UnsealedTsFileRecoverPerformer.java
@@ -49,6 +49,8 @@ import java.util.Map;
 import java.util.concurrent.ExecutionException;
 import java.util.function.Consumer;
 
+import static org.apache.iotdb.commons.conf.IoTDBConstant.FILE_NAME_SEPARATOR;
+
 /**
  * This class is used to help recover all unsealed TsFiles at zero level. There are 3 main
  * procedures: start recovery, redo logs, and end recovery, you must call them in order. Notice:
@@ -225,11 +227,13 @@ public class UnsealedTsFileRecoverPerformer extends AbstractTsFileRecoverPerform
       // flush memTable
       try {
         if (!recoveryMemTable.isEmpty() && recoveryMemTable.getSeriesNumber() != 0) {
+          String dataRegionId =
+              tsFileResource.getTsFile().getParentFile().getParentFile().getName();
+          String databaseName =
+              tsFileResource.getTsFile().getParentFile().getParentFile().getParentFile().getName();
           MemTableFlushTask tableFlushTask =
               new MemTableFlushTask(
-                  recoveryMemTable,
-                  writer,
-                  tsFileResource.getTsFile().getParentFile().getParentFile().getName());
+                  recoveryMemTable, writer, databaseName + FILE_NAME_SEPARATOR + dataRegionId);
           tableFlushTask.syncFlushMemTable();
           tsFileResource.updatePlanIndexes(recoveryMemTable.getMinPlanIndex());
           tsFileResource.updatePlanIndexes(recoveryMemTable.getMaxPlanIndex());