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 2023/06/30 12:28:59 UTC
[iotdb] branch rel/1.1 updated: [IOTDB-6023] Pipe: Fix load tsfile error while handling empty value chunk (#10406)
This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch rel/1.1
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/1.1 by this push:
new d780218f362 [IOTDB-6023] Pipe: Fix load tsfile error while handling empty value chunk (#10406)
d780218f362 is described below
commit d780218f362e46661a41c84a6e5b7b5d291600ad
Author: Itami Sho <42...@users.noreply.github.com>
AuthorDate: Fri Jun 30 20:28:53 2023 +0800
[IOTDB-6023] Pipe: Fix load tsfile error while handling empty value chunk (#10406)
---
.../java/org/apache/iotdb/db/engine/load/TsFileSplitter.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/engine/load/TsFileSplitter.java b/server/src/main/java/org/apache/iotdb/db/engine/load/TsFileSplitter.java
index 919c372c631..fb6d6a9dc90 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/load/TsFileSplitter.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/load/TsFileSplitter.java
@@ -229,7 +229,8 @@ public class TsFileSplitter {
chunkMetadata = offset2ChunkMetadata.get(chunkOffset - Byte.BYTES);
header = reader.readChunkHeader(marker);
if (header.getDataSize() == 0) {
- handleEmptyValueChunk(header, pageIndex2ChunkData, chunkMetadata);
+ handleEmptyValueChunk(
+ header, pageIndex2ChunkData, chunkMetadata, isTimeChunkNeedDecode);
break;
}
@@ -423,14 +424,17 @@ public class TsFileSplitter {
private void handleEmptyValueChunk(
ChunkHeader header,
Map<Integer, List<AlignedChunkData>> pageIndex2ChunkData,
- IChunkMetadata chunkMetadata)
+ IChunkMetadata chunkMetadata,
+ boolean isTimeChunkNeedDecode)
throws IOException {
Set<ChunkData> allChunkData = new HashSet<>();
for (Map.Entry<Integer, List<AlignedChunkData>> entry : pageIndex2ChunkData.entrySet()) {
for (AlignedChunkData alignedChunkData : entry.getValue()) {
if (!allChunkData.contains(alignedChunkData)) {
alignedChunkData.addValueChunk(header);
- alignedChunkData.writeEntireChunk(ByteBuffer.allocate(0), chunkMetadata);
+ if (!isTimeChunkNeedDecode) {
+ alignedChunkData.writeEntireChunk(ByteBuffer.allocate(0), chunkMetadata);
+ }
allChunkData.add(alignedChunkData);
}
}