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/10/24 12:09:27 UTC
[iotdb] branch fix_inplace_compaction_load created (now a8cb5ad116c)
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a change to branch fix_inplace_compaction_load
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at a8cb5ad116c Skip loading Chunk without matched ChunkMetadata
This branch includes the following new commits:
new a8cb5ad116c Skip loading Chunk without matched ChunkMetadata
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: Skip loading Chunk without matched ChunkMetadata
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch fix_inplace_compaction_load
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit a8cb5ad116c1f40576a3b49e628cca879288a4e7
Author: HTHou <hh...@outlook.com>
AuthorDate: Tue Oct 24 20:09:11 2023 +0800
Skip loading Chunk without matched ChunkMetadata
---
.../apache/iotdb/db/queryengine/execution/load/TsFileSplitter.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/load/TsFileSplitter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/load/TsFileSplitter.java
index 55c5bc0aa3a..a48df792e36 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/load/TsFileSplitter.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/load/TsFileSplitter.java
@@ -113,6 +113,12 @@ public class TsFileSplitter {
((header.getChunkType() & TsFileConstant.TIME_COLUMN_MASK)
== TsFileConstant.TIME_COLUMN_MASK);
IChunkMetadata chunkMetadata = offset2ChunkMetadata.get(chunkOffset - Byte.BYTES);
+ // When loading TsFile with Chunk in data zone but no matched ChunkMetadata
+ // at the end of file, this Chunk needs to be skipped.
+ if (chunkMetadata == null) {
+ reader.readChunk(-1, header.getDataSize());
+ break;
+ }
TTimePartitionSlot timePartitionSlot =
TimePartitionUtils.getTimePartitionSlot(chunkMetadata.getStartTime());
ChunkData chunkData =