This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch wal_compression
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/wal_compression by this push:
new d107c87ed8a try fix
d107c87ed8a is described below
commit d107c87ed8a15c70412ac9afb7e3d76d632b4b0d
Author: OneSizeFitQuorum <[email protected]>
AuthorDate: Wed Jul 3 15:39:37 2024 +0800
try fix
Signed-off-by: OneSizeFitQuorum <[email protected]>
---
.../iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java
index 350f8f5e995..3d7187475ed 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java
@@ -222,7 +222,7 @@ public class WALInputStream extends InputStream implements
AutoCloseable {
if (Objects.isNull(compressedBuffer)
|| compressedBuffer.capacity() < segmentInfo.dataInDiskSize
|| compressedBuffer.capacity() > segmentInfo.dataInDiskSize * 2) {
- compressedBuffer =
ByteBuffer.allocateDirect(segmentInfo.dataInDiskSize);
+ compressedBuffer = ByteBuffer.allocate(segmentInfo.dataInDiskSize);
}
compressedBuffer.clear();
// limit the buffer to prevent it from reading too much byte than
expected
@@ -293,7 +293,7 @@ public class WALInputStream extends InputStream implements
AutoCloseable {
} while (posRemain >= 0);
if (segmentInfo.compressionType != CompressionType.UNCOMPRESSED) {
- compressedBuffer =
ByteBuffer.allocateDirect(segmentInfo.dataInDiskSize);
+ compressedBuffer = ByteBuffer.allocate(segmentInfo.dataInDiskSize);
channel.read(compressedBuffer);
compressedBuffer.flip();
IUnCompressor unCompressor =
IUnCompressor.getUnCompressor(segmentInfo.compressionType);