apache / distributedlog

Apache DistributedLog
Apache License 2.0
185 stars 74 forks source link

Issue 226: ByteBuf.release() was not called before it's garbage-collected #230

Closed sijie closed 7 years ago

sijie commented 7 years ago

Descriptions of the changes in this PR:

the problem is a new entry buffer was allocated when closing log segment writer. the entry buffer is never used and also never recycled. It causes an annoying logging.

the fix is to assign a dummy entry writer which basically rejects writes, when closing a log segment writer. it would prevent leaking bytebuf.