You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ro...@apache.org on 2025/05/21 10:13:34 UTC

(iotdb) branch master updated: Pipe: Fix Active Load not getting DataBaseName correctly (#15551)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new ed5a600a129 Pipe: Fix Active Load not getting DataBaseName correctly (#15551)
ed5a600a129 is described below

commit ed5a600a129e07015ff63673e944d08e32aae359
Author: Zhenyu Luo <lu...@gmail.com>
AuthorDate: Wed May 21 18:13:28 2025 +0800

    Pipe: Fix Active Load not getting DataBaseName correctly (#15551)
---
 .../db/queryengine/plan/analyze/load/LoadTsFileAnalyzer.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileAnalyzer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileAnalyzer.java
index 4fccee49e12..4e52705b5fd 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileAnalyzer.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileAnalyzer.java
@@ -294,8 +294,16 @@ public class LoadTsFileAnalyzer implements AutoCloseable {
       }
 
       try {
-        if (Objects.nonNull(databaseForTableData)) {
-          loadTsFilesAsyncToTargetDir(new File(targetFilePath, databaseForTableData), tsFiles);
+        if (Objects.nonNull(databaseForTableData)
+            || (Objects.nonNull(context) && context.getDatabaseName().isPresent())) {
+          loadTsFilesAsyncToTargetDir(
+              new File(
+                  targetFilePath,
+                  databaseForTableData =
+                      Objects.nonNull(databaseForTableData)
+                          ? databaseForTableData
+                          : context.getDatabaseName().get()),
+              tsFiles);
         } else {
           loadTsFilesAsyncToTargetDir(new File(targetFilePath), tsFiles);
         }