Skip to content

Commit 4625903

Browse files
committed
fix(wal): fix leak caused by #3000
Signed-off-by: Robin Han <[email protected]>
1 parent 0ae65d8 commit 4625903

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

s3stream/src/main/java/com/automq/stream/s3/wal/impl/object/DefaultReader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ private void doRunBatchGet0(BatchReadTask readTask) {
195195
boolean isTriggerTrimRecord = batch.getCount() == 0 && batch.getStreamId() == -1L && batch.getEpoch() == -1L;
196196
if (!isTriggerTrimRecord) {
197197
batches.add(batch);
198+
} else {
199+
batch.release();
198200
}
199201
nextRecordOffset += lastReadableBytes - buf.readableBytes();
200202
lastReadableBytes = buf.readableBytes();

0 commit comments

Comments
 (0)