incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Au <bill.w...@gmail.com>
Subject Re: Best way to fix JMX threads leak in NodeProbe
Date Tue, 26 Oct 2010 20:33:34 GMT
I have opened a jira for this issue:

https://issues.apache.org/jira/browse/CASSANDRA-1665

I will submit a patch.

Bill

On Tue, Oct 26, 2010 at 12:21 PM, Jonathan Ellis <jbellis@gmail.com> wrote:

> Yes, we should add a close method.
> On Oct 26, 2010 9:14 AM, "Bill Au" <bill.w.au@gmail.com> wrote:
> > I have discovered a JMX threads leak in NodeProbe. Here is the original
> > email thread on the user mailing list:
> >
> > http://www.mail-archive.com/user@cassandra.apache.org/msg06764.html
> >
> > NodePorbe creats a JMXConnector but never calls JMXConnector.close(). The
> > use of a JMXConnector in NodeProbe is not exposed in its API. So without
> > changing the API, my initial thought is to add a finalize() method to
> > NodeProbe in which JMXConnector.close() is called. But I am not sure if
> > this is the best solution. Using a finalizer many lead to memory leak
> since
> > in this case NodeProbe will not be garbage collector until its finalizer
> is
> > called, but in Java the finalize() method is not guaranteed to be called
> at
> > any particular time. We probably don't want to create a new JMXConnector
> > for each operation. Should we add a close() method to NodeProbe which
> users
> > of NodeProbe has to call to avoid using a finalizer?
> >
> > Bill
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message