Skip to content

Commit 5703132

Browse files
Fix memory leak issue of reading small entries (apache#3844)
1 parent d6748f9 commit 5703132

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtoEncoding.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ public Object encode(Object msg, ByteBufAllocator allocator)
271271

272272
if (isSmallEntry) {
273273
buf.writeBytes(rr.getData());
274+
rr.release();
274275
return buf;
275276
} else {
276277
return ByteBufList.get(buf, rr.getData());

0 commit comments

Comments
 (0)