cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ariel Weisberg (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-13906) Properly close StreamCompressionInputStream to release any ByteBuf
Date Fri, 29 Sep 2017 16:35:03 GMT


Ariel Weisberg commented on CASSANDRA-13906:

So to bikeshed this all to hell. Wouldn't the most idiomatic way to do this be to have TrackedDataInputPlus
implement Closable and use try with resources?

In fact try with resources will let you declare all the Closeable things in the same try block
and clean up if one of the things you are using to wrap throws in it's constructor preventing
the wrapped resource from leaking.

> Properly close StreamCompressionInputStream to release any ByteBuf
> ------------------------------------------------------------------
>                 Key: CASSANDRA-13906
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jason Brown
>            Assignee: Jason Brown
> When running dtests for trunk (4.x) that perform some streaming, sometimes a {{ByteBuf}}
is not released properly, and we get this error in the logs (causing the dtest to fail):
> {code}
> ERROR [MessagingService-NettyOutbound-Thread-4-2] 2017-09-26 13:42:37,940
- LEAK: ByteBuf.release() was not called before it's garbage-collected. Enable advanced leak
reporting to find out where the leak occurred. To enable advanced leak reporting, specify
the JVM option '-Dio.netty.leakDetection.level=advanced' or call ResourceLeakDetector.setLevel()
See for more information.
> {code}

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message