shuwenwei commented on code in PR #13059:
URL: https://github.com/apache/iotdb/pull/13059#discussion_r1695283543
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java:
##########
@@ -312,12 +312,16 @@ public void skipToGivenLogicalPosition(long pos) throws
IOException {
public void read(ByteBuffer buffer) throws IOException {
int totalBytesToBeRead = buffer.remaining();
- int currReadBytes = Math.min(dataBuffer.remaining(), buffer.remaining());
- dataBuffer.get(buffer.array(), buffer.position(), currReadBytes);
- if (totalBytesToBeRead - currReadBytes > 0) {
- loadNextSegment();
- read(buffer);
+ while (totalBytesToBeRead > 0) {
Review Comment:
Added
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]