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 2024/06/20 10:42:39 UTC
(iotdb) branch load-oom-npe created (now 722fcfc1736)
This is an automated email from the ASF dual-hosted git repository.
rong pushed a change to branch load-oom-npe
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at 722fcfc1736 Load: Avoid potential NPE in warn log when LoadRuntimeOutOfMemoryException occurs
This branch includes the following new commits:
new 722fcfc1736 Load: Avoid potential NPE in warn log when LoadRuntimeOutOfMemoryException occurs
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: Load: Avoid potential NPE in warn log when LoadRuntimeOutOfMemoryException occurs
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch load-oom-npe
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 722fcfc173674f904824f62e8f44df5c80b627cc
Author: Steve Yurong Su <ro...@apache.org>
AuthorDate: Thu Jun 20 18:42:32 2024 +0800
Load: Avoid potential NPE in warn log when LoadRuntimeOutOfMemoryException occurs
---
.../org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java | 4 +++-
.../apache/iotdb/db/queryengine/plan/analyze/LoadTsfileAnalyzer.java | 4 +---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java
index bcd90ceaf1e..6071f29edea 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java
@@ -2848,7 +2848,9 @@ public class AnalyzeVisitor extends StatementVisitor<Analysis, MPPQueryContext>
@Override
public Analysis visitLoadFile(LoadTsFileStatement loadTsFileStatement, MPPQueryContext context) {
- long startTime = System.nanoTime();
+ context.setQueryType(QueryType.WRITE);
+
+ final long startTime = System.nanoTime();
try (final LoadTsfileAnalyzer loadTsfileAnalyzer =
new LoadTsfileAnalyzer(loadTsFileStatement, context, partitionFetcher, schemaFetcher)) {
return loadTsfileAnalyzer.analyzeFileByFile();
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/LoadTsfileAnalyzer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/LoadTsfileAnalyzer.java
index 79e84b3400d..b9b229f8705 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/LoadTsfileAnalyzer.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/LoadTsfileAnalyzer.java
@@ -136,9 +136,7 @@ public class LoadTsfileAnalyzer implements AutoCloseable {
}
public Analysis analyzeFileByFile() {
- context.setQueryType(QueryType.WRITE);
-
- Analysis analysis = new Analysis();
+ final Analysis analysis = new Analysis();
// check if the system is read only
if (CommonDescriptor.getInstance().getConfig().isReadOnly()) {