This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch rel/1.2
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/1.2 by this push:
new 11f7c4eda86 [IOTDB-6023] Pipe: LoadTsFilePieceNode error when loading
tsfile with empty value chunks (#10282)
11f7c4eda86 is described below
commit 11f7c4eda86a6ce34fd70c914dc8822f855abd78
Author: yschengzi <[email protected]>
AuthorDate: Fri Jun 23 20:50:15 2023 +0800
[IOTDB-6023] Pipe: LoadTsFilePieceNode error when loading tsfile with empty
value chunks (#10282)
---
.../main/java/org/apache/iotdb/db/engine/load/TsFileSplitter.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 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 e3010f0eeb2..919c372c631 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,7 @@ public class TsFileSplitter {
chunkMetadata = offset2ChunkMetadata.get(chunkOffset - Byte.BYTES);
header = reader.readChunkHeader(marker);
if (header.getDataSize() == 0) {
- handleEmptyValueChunk(header, pageIndex2ChunkData);
+ handleEmptyValueChunk(header, pageIndex2ChunkData,
chunkMetadata);
break;
}
@@ -421,12 +421,16 @@ public class TsFileSplitter {
}
private void handleEmptyValueChunk(
- ChunkHeader header, Map<Integer, List<AlignedChunkData>>
pageIndex2ChunkData) {
+ ChunkHeader header,
+ Map<Integer, List<AlignedChunkData>> pageIndex2ChunkData,
+ IChunkMetadata chunkMetadata)
+ 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);
allChunkData.add(alignedChunkData);
}
}