[
https://issues.apache.org/jira/browse/HDDS-10000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17800022#comment-17800022
]
Attila Doroszlai commented on HDDS-10000:
-----------------------------------------
[~duongnguyen], from the point of the tracked object it is a "sub-resource" to
close:
{code}
private final LeakTracker leakTracker = track(this);
public void close() {
super.close();
leakTracker.close();
}
{code}
Changing it to:
{code}
private final Closeable leakTracker = track(this);
public void close() {
super.close();
leakTracker.close();
}
{code}
the point is that the tracked object should not call other methods exposed due
to {{LeakTracker extends WeakReference}}.
> Improve LeakDetector
> --------------------
>
> Key: HDDS-10000
> URL: https://issues.apache.org/jira/browse/HDDS-10000
> Project: Apache Ozone
> Issue Type: Improvement
> Affects Versions: 1.5.0
> Reporter: Attila Doroszlai
> Assignee: Attila Doroszlai
> Priority: Major
>
> HDDS-9528 introduces a leak detector framework.
> Possible improvements:
> * simplify managed objects by moving {{getStackTrace()}} into {{track()}}
> (need to skip +1 level in {{formatStackTrace()}}
> * let {{LeakTracker}} implement {{AutoCloseable}} and change methods that
> return it to use the interface
> * distinguish detectors with the same name by appending a unique integer
> * split two test cases in {{TestLeakDetector}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]